<!DOCTYPE html>
<!-- ======================================================================= -->
<!--                        h a n d b o o k . h t m l                        -->
<!-- ======================================================================= -->
<html lang="en">
    <head>
        <title>
            Audiveris - Handbook
        </title>

        <script type="text/javascript">
            //<![CDATA[
            context = {page: "Handbook", root: "../../"};
            //]]>
        </script>

        <!-- Java Deployment Toolkit -->
        <script src="https://www.java.com/js/deployJava.js"></script>

        <meta charset="utf-8" />
        <meta name="description" content="How to operate Audiveris" />
        <meta name="author" content="Hervé Bitteur" />

        <link rel="icon" href="../../branding/images/audiveris-icons-256.ico"
              type="image/x-icon" />

        <link rel="stylesheet" href="../../branding/css/global.css" />
        <link rel="stylesheet" href="../../branding/css/left-nav.css" />
        <link rel="stylesheet" href="../../branding/css/top-nav.css"/>
        <link rel="stylesheet" href="../../branding/css/title-numbering.css" />
        <link rel="stylesheet" href="../../branding/css/expansion.css" />

        <style type="text/css">
            /*<![CDATA[*/
            /* -- Printing -- */
            @page { 
                margin-left: 1cm; 
                margin-right: 1cm; 
                margin-top: 2cm; 
                margin-bottom: 1cm 
            }

            /* -- Content -- */
            h2 {
                text-align: center;
                padding-top: 2em;
            }

            .cell-spaced {
                border-spacing: 20px;
            }

            /* -- ids -- */
            #appli-snippet {
                width: 320px;
            }
            #cli-snippet {
                width: 700px;
                margin-left: 20px;                 
                font-size: 0.9em; 
            }
            #jvm-snippet {
                width: 500px;
            }
            #plugins-snippet {
                width: 500px;
            }
            #script-snippet {
                width: 580px;
            }
            #warped,
            #dewarped{
                float: left;
                margin: 10px;
            }

            /* -- Smooth targets -- */
            h2:target,
            h3:target {
                padding-top: 2em;
                padding-bottom: 1em;
            }
            article:target {
                margin-top: 2em;
                margin-bottom: 2em;
                background-color: #fffaf2;
                border-radius: 12px;
                box-shadow: 0px 4px 4px 2px rgba(45,20,6,0.8);
            }
            h1,
            h2,
            h3,
            article {
                transition:all .5s ease;
            }

            /* -- Folders -- */
            table.content {
                margin-top: 20px;
                border-spacing: 10px;
            }
            .location td {
                background-color: #ffeeee;;
            }
            .content td {
                background-color: white;
            }
            .location td:first-child,
            .content td:first-child {
                font-weight: bold;
                background-color: #f8f8ff;
                border-radius: 15px;
            }
            .location td:nth-child(2),
            .content td:nth-child(3) {
                font-family: monospace;
                font-size: 120%;
            }
            .location td,
            .content td {
                padding-left: 5px;
                padding-right: 5px;
                box-shadow: 1px 1px 1px 0px rgba(45,20,6,0.2);
            }

            /* -- Table of modes -- */
            table#modes,
            table#modes th,
            table#modes td {
                border: 1px solid black;
            }
            table#modes {
                border-collapse: collapse;
            }

            table#modes td {
                padding: 10px;
            }
            table#modes td.checkbox {
                text-align: center;
            }
            table#modes td.codebase {
                width: 130px;
                text-align: center;
            }
            table#modes td.mode {
                width: 90px;
                text-align: center;
            }

            /*]]>*/
        </style>
    </head>

    <body>
        <!-- Standard top header -->
        <script src="../../branding/js/header.js"></script> 

        <div class="main">
            <span id="top"></span>

            <h1>
                Handbook
            </h1>
            <p>
                This documentation applies to Audiveris version 4.3 and 
                above, for Windows and Linux environments.
            </p>

            <!-- =========================================================== -->

            <section>
                <h2 id="getting-started">
                    Getting started
                </h2>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
                <article id="jws">
                    <h3>
                        Java Web Start
                    </h3>
                    <p>
                        The goal is to now drive all installations and runs of 
                        Audiveris through Java Web Start.
                        <i>[Some information on former approaches is still 
                            available in the 
                            <a href="#development">Development</a> section]</i>                            
                    </p>
                    <p>
                        Instead of multiple installation files, there is now
                        just a single JNLP file available on Audiveris home page
                        to deploy and run the application on different OS'es 
                        such as <b>Windows</b>, <b>Linux</b> or <b>Mac</b>, 
                        using either <b>32-bit</b> or <b>64-bit</b> architectures.                       
                    </p>
                    <p>
                        Applications launched with Java Web Start are cached 
                        locally and can be automatically checked for updates.
                        An Internet connection is really mandatory only for the 
                        very first launch.
                        An already-downloaded application is launched on par
                        with a traditionally installed application,
                        especially as Audiveris shortcuts are installed 
                        (through a desktop icon and through a program menu item).
                    </p>

                    <div class="indent warning">
                        <p>
                            NOTA: As of this writing, this Java Web Start 
                            approach works for the <b>Oracle Java</b> 
                            environment only, whether on <b>Windows</b> or 
                            <b>Ubuntu</b>.
                            <b>Mac</b> is still to go and on Ubuntu,
                            <b>IcedTea</b> Java needs further debugging.
                        </p>
                        <p>
                            To check or modify which Java Web Start tool is 
                            used by default on Ubuntu, use the command:
                        </p>
                        <p class="indent">
                            <code>sudo update-alternatives --config javaws</code>
                        <p>
                    </div>

                    <h4 id="first-launch">First launch</h4>

                    <p>To launch Audiveris the very first time, you have several 
                        possibilities, regardless of your operating system:</p>
                    <ul>
                        <li>Either click on the 
                            <script>deployJava.createWebStartLaunchButton('https://audiveris.kenai.com/jnlp/launch.jnlp', 1.7);</script>
                            button located in the upper right corner of this page,
                            or the same button found on 
                            <a href="http://audiveris.kenai.com/">
                                Audiveris home page</a>.
                            To be actually visible, this button requires 
                            that JavaScript be enabled in your browser.
                            When clicked, it will ensure that an 
                            appropriate Java Runtime Environment is 
                            installed and then launch the JNLP application.
                        </li>
                        <li>Or click on the following hypertext link to 
                            <a href="">Launch the application</a>.
                            This link appears even if JavaScript is not enabled.
                            However, it assumes that your browser and Java 
                            environments are properly configured to handle the
                            linked JNLP file.
                        </li>
                        <li>Or finally from a terminal directly use the command:
                            <code>javaws https://audiveris.kenai.com/jnlp/launch.jnlp</code>
                            <br/>
                            (Nota: mind the 's' in https. Otherwise you may get 
                            errors like "illegal URL redirect")
                        </li>
                    </ul>

                    <p>
                        All methods will trigger the download and processing by  
                        <code>javaws</code> (the Java Web Start launcher which 
                        is part of Java runtime) of a 
                        small XML file named <code>launch.jnlp</code>.
                        Such JNLP file describes the whole download and launch
                        process.
                        The main visible steps are described here after in 
                        sequence (most pictures are taken from the Windows
                        environment, their Ubuntu equivalent are very similar):
                    </p>
                    <br class="clear"/>

                    <img class="side" title="Java launcher" 
                         src="../images/installer-java.png" />
                    <p>
                        The local Java runtime downloads the 
                        JNLP file and related resources. 
                    </p>
                    <p>
                        The JNLP file describes a set or requirements, including
                        the Java environment.
                        If needed, a more recent Java runtime may get downloaded
                        automatically.
                    </p>

                    <br class="clear"/>
                    <img class="side clear" title="Downloading application" 
                         src="../images/installer-downloading.png" />
                    <p>
                        The initial components for Audiveris application are
                        downloaded as needed and cached locally.
                    </p>
                    <p>
                        The download applies for the first launch only, after
                        that they are taken directly from the local Java cache.
                    </p>

                    <br class="clear"/>
                    <img class="side" title="Launching installer" 
                         src="../images/installer-launching.png" />
                    <p>
                        Since this is the first launch, an extension component
                        named the "Audiveris bundle Installer" is called to 
                        install the whole bundle of needed software companions.
                    </p>
                    <p>
                        Compare with the previous window, and notice the name 
                        (Audiveris bundle Installer) as well as
                        the JNLP file (<code>installer.jnlp</code>).
                    </p>

                    <br class="clear"/>
                    <img class="right" title="Security warning" 
                         src="../images/installer-security.png" />
                    <p>
                        You may get a security warning like this one 
                        because Audiveris will need to escape the default 
                        sandbox and access local disk.
                    </p>
                    <p>
                        You can safely accept this and even check the option
                        for not showing this warning again.
                    </p>

                    <br class="clear"/>
                    <img class="side" title="Installer User Interface" 
                         src="../images/installer-gui.png" />
                    <p>
                        This is the installer User Interface:
                    </p>
                    <ul>
                        <li>The top row allows to select which languages should
                            be supported by the embedded OCR.</li>
                        <li>The second row presents the sequence of companions
                            to install. 
                            Some are optional (Examples, Plugins, Training data)
                            and can be selected through a check box.
                        </li>
                        <li>The middle area is meant for display of main messages.</li>
                        <li>The footer provides buttons to launch or cancel the
                            installation.</li>
                    </ul>

                    <p>
                        Note that you cannot change the folder where Audiveris
                        application data is installed.
                        This feature may be provided in a future version.
                    </p>
                    <p>
                        An item color depends on item current status:
                    </p>
                    <ul>
                        <li><span style="background:#fdd">pink</span> for an item
                            that is needed (mandatory or selected optional) but not
                            yet installed,</li>
                        <li><span style="background:#afa">green</span>  for an 
                            installed needed item,</li>
                        <li><span style="background:#ddd">gray</span>  for an 
                            optional item not selected,</li>
                        <li><span style="background:orange">orange</span>  for an 
                            item being processed,</li>
                        <li><span style="background:red">red</span>  for an item 
                            which failed to install.</li>
                    </ul>

                    <br class="clear"/>
                    <img class="side" title="Add OCR languages" 
                         src="../images/installer-add-lang.png" />
                    <p>
                        Using the <code class="button">Add</code> button from
                        the language row, you can select languages on top of the
                        predefined ones 
                        (<code>deu</code>, <code>eng</code>, <code>fra</code>, 
                        <code>ita</code>).
                    </p>
                    <p>
                        You can remove a language as well, even from the 
                        predefined ones, via a right-click on the proper item 
                        in the language row.
                        But make sure you don't install OCR with no language at 
                        all otherwise it will fail at runtime.
                    </p>

                    <br class="clear"/>
                    <img class="side" title="Software license" 
                         src="../images/installer-license.png" />
                    <p>
                        Right after clicking <code class="button">Install</code>,
                        you are prompted for agreement with Audiveris license.
                    </p>
                    <p>
                        Click <code class="button">View License</code> to open
                        a browser on precise license content.
                    </p>
                    <p>
                        Select <code class="button">Yes</code> if you 
                        accept license terms and want to continue installation.
                    </p>

                    <br class="clear"/>
                    <img class="side" title="Downloading companion" 
                         src="../images/installer-dl-lang.png" />
                    <p>
                        Each companion is processed in sequence, as displayed by
                        the current heading and the global progress bar.
                    </p>
                    <p>
                        If some external resource is downloaded, the status text,
                        right above the global progress bar, displays the name of
                        the remote URL being downloaded.
                    </p>
                    <p>
                        Note the progress bar indicates the global progress
                        (in terms of companions) rather than the current 
                        download progress (in terms of bytes downloaded).
                        So be patient, let the download proceed.
                    </p>

                    <br class="clear"/>
                    <p>
                        Depending on your environment, the installation of 
                        software companions may require a write-access to
                        system locations 
                        such as <code>c:\Program Files</code> folder under 
                        Windows, and similar locations for other OS'es.
                        By default a standard user is not allowed to write to
                        these locations, so you may be prompted for "elevation"
                        to Administrator level to complete the installation.
                    </p>
                    <img class="right" title="User Account Control" 
                         src="../images/installer-uac.png" />
                    <p>On Windows you will see this typical UAC 
                        (User Account Control) dialog that recent Windows 
                        versions use to prompt for user agreement.
                    </p>
                    <p>
                        Click <code class='button'>Yes</code> to proceed and 
                        let the installer run.
                    </p>

                    <br class="clear"/>
                    <img class="right" title="gksudo prompt" 
                         src="../images/installer-gksudo.png" />
                    <p>
                        On Ubuntu, you will see a <code>gksudo</code>
                        or a <code>kdesudo</code> prompt for your password in
                        order to perform the final administrative task.
                    </p>
                    <p>
                        Enter your password and proceed.
                    </p>                                        

                    <br class="clear"/>
                    <img class="side" title="Installation complete" 
                         src="../images/installer-complete.png" />
                    <p>
                        At the end, this message notifies a successful 
                        completion. You can now safely exit the installer so 
                        that Audiveris application can proceed.
                    </p>
                    <p>
                        If one or several companions failed to install, you will
                        get instead an installation global failure message
                        (on top of the dialog(s) describing each failure context).
                    </p>
                    <p>
                        Note that all details of installation, whether 
                        successful or not, are kept in a dedicated log file named
                        <code>audiveris-installation-&lt;TIMESTAMP&gt;.log</code>
                        and located in your temporary directory.
                    </p>

                    <br class="clear"/>
                    <a href="../images/installer-audiveris.png">
                        <img class="side" title="Audiveris Application" 
                             src="../images/installer-audiveris.png" 
                             width="570"/>
                    </a>
                    <p>
                        This is the end. If installation succeeded you can now
                        see the main Audiveris application window.
                    </p>

                    <h4 id="next-launches">Next launches</h4>

                    <p>
                        For the next launches, you can still use either the
                        Launch button or the plain link on Audiveris home page,
                        or the command line in a terminal window.
                    </p>
                    <p>
                        Since the application is now "installed", you can  
                        use the shortcuts as well:
                    </p>
                    <ul>
                        <li>The desktop icon: 
                            <img title="Desktop icon" 
                                 src="../images/installer-icon.png" />
                        </li>
                        <li>
                            The Audiveris menu item in Windows start menu.
                        </li>
                    </ul>

                    <p>
                        Data is now kept in Java cache.
                        Hence, whatever the way you launch Audiveris JNLP file, 
                        all sequences are now very short:
                    </p>
                    <ol>
                        <li>The initial window "Java 7..." or similar appears
                            for a couple of seconds,</li>
                        <li>The final Audiveris application window follows
                            immediately.</li>
                    </ol>

                    <p>
                        <b>32-bit vs 64-bit: "<i>Tesseract OCR is not installed properly</i>" </b>
                    </p>
                    <p>
                        A 32-bit OS can run only 32-bit programs, but a 64-bit
                        OS can usually run both 32-bit and 64-bit programs.
                        This applies to the <code>javaws</code> program as well,
                        and typically you can have different Java environments
                        installed on your OS.
                        Java byte-code is OS and architecture independent, but
                        Audiveris needs Tesseract OCR software, a C++ program,
                        accessed through JNI in the same process.
                        The related binary files are installed by Audiveris
                        installer into proper (Windows) system folders:
                        a 32-bit <code>javaws</code> will target 32-bit system 
                        folders while a 64-bit <code>javaws</code> will target
                        64-bit system folders.
                    </p>
                    <p>
                        If, on following launches, you observe messages like 
                        "<i>Error while loading library jniTessBridge</i>"
                        (in the log window) or
                        "<i>Tesseract OCR is not installed properly</i>" 
                        (in a popup), they signal an architecture mismatch: 
                        you are trying to load 64-bit binaries from a 32-bit
                        javaws/JVM or vice versa.
                        Typically, for some unknown reason, the shortcut 
                        installed by JNLP may point to a 32-bit version of Java,
                        this has been observed on Windows when both 32-bit and 
                        64-bit Java environments are installed.
                    </p>
                    <p>
                        To fix this, you can modify the shortcut as follows.
                        Use a right-click on the icon, to select Properties then
                        Shortcut. The "target" field points to a javaws.exe 
                        program.
                        If the field begins with
                        <code>C:\Windows\SysWOW64\javaws.exe</code> then it is
                        pointing to 32-bit Java.
                        So modify it so that it points to 64-bit Java, using 
                        either <code>javaws.exe</code> alone if the 64-bit Java 
                        appears first in the path, or an explicit link such as
                        <code>C:\Program Files\Java\jre7\bin\javaws.exe</code>.
                    </p>

                    <p>
                        Better yet, you can even have both 32-bit and 64-bit 
                        versions of Audiveris active at the same time, each with
                        its own set of binaries in proper system folders.
                        To do so, you have to install each version, for example
                        (assuming you have uninstalled any previous version):
                    </p>
                    <ol>
                        <li><code>(32-bit)\javaws https://audiveris.kenai.com/jnlp/launch.jnlp</code></li>
                        <li><code>javaws -uninstall https://audiveris.kenai.com/jnlp/launch.jnlp</code></li>
                        <li><code>(64-bit)\javaws https://audiveris.kenai.com/jnlp/launch.jnlp</code></li>
                    </ol>
                    <p>
                        The purpose of step #2 (uninstall) is to remove Audiveris 
                        from Java cache so that the next call to javaws (step #3)
                        will actually trigger the download of the needed binaries
                        from Audiveris web site.

                        From that point on, you can use either 32-bit javaws
                        or 64-bit javaws (or whatever launch mechanism you 
                        choose) and it will launch the corresponding version
                        immediately since both binary sets are available, while
                        Audiveris byte-code is in Java cache.
                    </p>

                    <img class="right" title="Application update" 
                         src="../images/installer-update.png" />
                    <p>
                        <b>Application updates:</b>
                    </p>
                    <p>
                        New versions of Audiveris resources may become 
                        available on the server. 
                        Every time you launch Audiveris, a quick network access
                        is performed to check if there are new versions of
                        resources. If so, you will be prompted for updating the
                        application if you wish.
                    </p>
                    <p>
                        Note that due to time-zone differences between server
                        and client, this might result in a delay of up to 24 
                        hours between when a new Jar is uploaded, and when it
                        is recognized as new content to be updated.
                    </p>

                    <h4 id="java-cache">Java cache</h4>

                    <p>
                        So, where has Audiveris application gone? 
                        In the global Java cache.
                        And you can monitor this Java cache, from the Java 
                        Control Panel.
                    </p>
                    <img class="side" title="Java cache" 
                         src="../images/installer-jcp.png" />
                    <p>To display the Java Control Panel:</p>
                    <ul>
                        <li>
                            On Windows, use the Control Panel and select Java.
                        </li>
                        <li>
                            On Ubuntu, use the terminal command:
                            <code>ControlPanel</code>.
                        </li>
                    </ul>
                    <p>
                        From this panel:
                    </p>
                    <p>
                        <code class='button'>Settings...</code> allows to
                        manage the cache globally and especially through
                        <code class='button'>Delete Files...</code> to clear 
                        everything and restart from a fresh cache.
                    </p>
                    <p>
                        <code class='button'>View...</code> allows to manage 
                        each cached application individually.
                    </p>
                    <p>                        
                        More directly, from a terminal in Windows or Ubuntu,
                        the command line:
                        <br/>
                        <code>javaws -viewer</code> 
                        <br/>
                        opens both the Java Control Panel and its applications 
                        viewer.
                    </p>

                    <br class="clear"/>
                    <img class="side" title="Java cache" 
                         src="../images/cache-viewer.png" />
                    <p>
                        This view displays all installed cached Java 
                        applications.
                    </p>

                    <p>
                        Select the Audiveris application, and use either the
                        icons in the tool bar or a right-click for context menu,
                        to:
                    </p>

                    <ul>
                        <li>Run the application, either online (connected to
                            the web) or offline (with no web connection).</li>
                        <li>Display the application JNLP file.</li>
                        <li>Install shortcuts if not done yet.</li>
                        <li>Uninstall the application.</li>
                        <li>Display the application web page.</li>
                    </ul>

                    <h4 id="uninstallation">Uninstallation</h4>

                    <p>
                        To uninstall Audiveris, you can:
                    </p>
                    <ul>
                        <li>Either use the cache view as shown above, and 
                            select the uninstallation action,</li>
                        <li>Or, in a terminal window, use the command line:
                            <code>javaws -uninstall https://audiveris.kenai.com/jnlp/launch.jnlp</code>
                            <br>[note the <code>-uninstall</code> option]
                        </li>
                    </ul>
                    <br class="clear"/>
                    <img class="side" title="Uninstalling" 
                         src="../images/installer-remove.png" />
                    <p>
                        This is the window which tells from the Cache Viewer 
                        that the application is being removed.
                    </p>

                    <p>
                        You then get the Audiveris bundle Installer window,
                        this time running for uninstallation.
                        For the time being, the "uninstaller" is just a stub, 
                        meaning the software companions are not actually 
                        uninstalled and you get the following message almost 
                        immediately:
                    </p>

                    <img class="side" title="Bundle uninstalled" 
                         src="../images/installer-uninstalled.png" />

                    <br class="clear"/>
                    <img class="side" title="Cache of deleted applications" 
                         src="../images/cache-deleted.png" />
                    <p>
                        Looking at the Cache Viewer, you can see that Audiveris
                        no longer appears in the <code>Applications</code> 
                        section.
                    </p>
                    <p>
                        But selecting the <code>Deleted Applications</code>
                        section, you can see that Audiveris is listed among
                        the deleted applications.
                        From there, using tool bar icons or right-click, you
                        can:
                    </p>
                    <ul>
                        <li>Either re-install the application.
                            This will run quickly since most data parts are
                            still in the cache.</li>
                        <li>Or, actually remove application data from the cache.
                            From that point on, any reinstall will imply a new 
                            download.</li>
                    </ul>

                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="loading-an-image">
                    <h3>
                        Loading an image
                    </h3>
                    <img class="side" width="251" height="139" title="Input selection" 
                         alt="chula-input" src="../images/chula-input.png" />
                    <p>
                        The main purpose of a music scanner like Audiveris is to
                        analyze the image of a sheet of music and transcribe it to the
                        standard symbolic format that all other music applications can
                        read and write for further processing.
                    </p>
                    <p>
                        To load an image, use the menu <code>File </code> | <code> 
                            Input</code> and select some input file.
                    </p>
                    <p>
                        Another way to load an input file, is to directly use a drag n'
                        drop from the file explorer to the Audiveris application window.
                    </p>
                    <p class="clear">
                        A few hints:
                    </p>
                    <ul>
                        <li>All major formats are supported, notably PDF, TIFF, JPG,
                            PNG, BMP.
                        </li>
                        <li>
                            One input file leads to one score. 
                            One multi-page input file (PDF and TIFF formats provide this
                            feature) leads to one score composed of as many pages.
                        </li>
                        <li>Prefer gray level images, with pixels value in the 0 - 255
                            range, to black and white images.
                            Color images are supported as well.
                        </li>
                        <li>If you scan paper sheets by yourself, pay attention to the
                            scan resolution. Best results are obtained with resolution
                            around 300 DPI. Lower resolutions may hide key details while
                            higher ones turn quickly into a significant waste of CPU and
                            memory resources.
                        </li>
                    </ul>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="transcription">
                    <h3>
                        Transcription
                    </h3>
                    <img class="side" title="Transcribe" width="307" height="259"
                         alt="transcribe" src="../images/chula-build-score.png" />                  
                    <p>
                        To launch the image transcription, use the menu <code> Score 
                        </code>|<code> Transcribe</code>.
                    </p>
                    <p>
                        The same action can be launched directly from the toolbar icon
                        <img class="icon" 
                             src="../images/forward.png" />
                    </p>
                    <br class="clear"/>

                    <img class="right" title="Step selection" 
                         alt="score-step" src="../images/chula-score-step.png" />
                    <p>
                        You can as well select the SCORE target through the menu 
                        <code> Step </code>|<code> SCORE</code>.
                    </p>
                    <p>
                        Don't get too impressed by the list of steps available:
                    </p>
                    <ul>
                        <li>All steps from <code>LOAD</code> to <code>SCORE</code> are 
                            the mandatory steps. 
                            In fact they will be processed as needed in sequence when 
                            some output is asked for.
                            See the <a href="#cli">Command Line Interface</a> section for
                            a quick presentation of the steps sequence and the 
                            <a href="#internals">Internals</a> chapter for further 
                            details.</li>
                        <li>The subsequent steps (<code>PRINT</code>, <code>EXPORT</code>,
                            <code>PLUGIN</code>), those displayed after the separating 
                            line in the step menu, represent the actual outputs. 
                            These are the steps that a casual user is interested in.</li>
                    </ul>

                    <h4 id="main-window-layout">
                        Main window layout
                    </h4>
                    <figure class="right">
                        <a href="../images/chula-score.png">
                            <img width="629" height="467" 
                                 src="../images/chula-score.png"
                                 alt="score" title="Application main window"/>
                        </a>
                        <figcaption>
                            [Click on image for full-size display]
                        </figcaption>
                    </figure>
                    <p>
                        Within a few seconds after selecting the <code>SCORE</code> step
                        (or any other subsequent step) you should get a screen similar 
                        to this picture.
                    </p>
                    <p>
                        Since version 4, Audiveris has merged the former sheet and score
                        views into a single panel. 
                        This saves screen space and allows quick visual checking.
                    </p>
                    <p>
                        Audiveris main window is now composed of 4 panels:
                    </p>
                    <dl>
                        <dt>Sheet</dt>
                        <dd>
                            This is the large panel in the upper left corner.
                            <br/>
                            The <code>Picture</code> tab presents the input image,
                            while the <code>Data</code> tab presents the objects
                            (sections and glyphs) extracted from the image. In the
                            <code>Data</code> tab, the objects representing staff lines
                            or stems are drawn as thin lines.
                        </dd>
                        <dt>Boards</dt>
                        <dd>
                            The right panel is a vertical set of boards, that are used
                            as both user input and output. Only basic boards are
                            displayed by default. A right click in this column allows
                            to display or hide selected boards.
                        </dd>
                        <dt>Events</dt>
                        <dd>
                            The lower left panel is a log of the main events that
                            occurred so far.
                            More details are available in the Audiveris log 
                            file (the precise path to this log file is displayed
                            at the top of the event panel)
                        </dd>
                        <dt>Errors</dt>
                        <dd>
                            The lower middle panel displays a sorted list of detected
                            errors. A click on an error line in this panel moves you to
                            the related location in the sheet panel.
                        </dd>
                    </dl>

                    <h4 id="sheet-display-modes">
                        Sheet display modes
                    </h4>
                    <table class="no-border side cell-spaced">
                        <tr>
                            <th></th>
                            <th>Picture tab</th>
                            <th>Data tab</th>
                        </tr>
                        <tr>
                            <th>Physical mode</th>
                            <td>
                                <img src="../images/picture-physical.png" alt=
                                     "pic-physical" />
                            </td>
                            <td>
                                <img src="../images/data-physical.png" alt=
                                     "data-physical" />
                            </td>
                        </tr>
                        <tr>
                            <th>Combined mode</th>
                            <td>
                                <img src="../images/picture-combined.png" alt=
                                     "pic-combined" />
                            </td>
                            <td>
                                <img src="../images/data-combined.png" alt=
                                     "data-combined" />
                            </td>
                        </tr>
                        <tr>
                            <th>Logical mode</th>
                            <td>
                                <img src="../images/picture-logical.png" alt=
                                     "pic-logical" />
                            </td>
                            <td>
                                <img src="../images/data-logical.png" alt=
                                     "data-logical" />
                            </td>
                        </tr>
                    </table>
                    <p>
                        For the sheet panel you can choose between 3 display modes:
                    </p>
                    <ul>
                        <li>The <code>physical</code> mode displays the sheet glyphs
                            colorized according to their recognized shape and using 
                            their physical coordinates.
                        </li>
                        <li>The <code>logical</code> mode displays the logical score
                            entities built from the interpretation of the physical 
                            glyphs.
                        </li>
                        <li>The <code>combined</code> mode is a combination of the
                            physical and logical layers. It displays the logical 
                            entities in a translucent manner on top of the physical 
                            glyphs.
                        </li>
                    </ul>
                    <p>
                        Using the menu <code>Views</code> | <code>Switch layers</code> 
                        you can circle through 
                        the different modes <code>Physical</code> /
                        <code>Combined</code> / <code>Logical</code>.
                        <br>
                        You can also use the <code class="key">F12</code> function key
                        or the related toolbar icon
                        <img class="icon" width="16" height="16" 
                             src="../images/kbemusedsrv.png" />
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="outputs">
                    <h3>
                        Outputs
                    </h3>
                    <p>The transcription data, which results from the SCORE step, can
                        then be further used by:
                    </p>
                    <img class="side" title="Plugin selection" width="241" height="146"
                         alt="musescore" src="../images/plugin-musescore.png" />
                    <ul>
                        <li>The <b>PRINT</b> step (or the menu <code>Score</code> |
                            <code>Print...</code>) writes the resulting image into a
                            PDF file. The image is basically the content of the
                            <code>Picture</code> tab in <code>logical</code> mode.
                        </li>
                        <li>The <b>EXPORT</b> step (or the menu <code>Score</code> |
                            <code>Export...</code>) writes a MusicXML file with the
                            exported score entities.
                        </li>
                        <li>The <b>PLUGIN</b> step (or any <b>plugin</b> accessed
                            through the <code>Plugins</code> menu) launches a plugged
                            application on the exported MusicXML file. Refer to the 
                            <a href="#plugins">Plugins section</a> for further details.
                            <br/>
                        </li>
                    </ul>
                    <p>
                        Note there is no need to manually go through the intermediate
                        steps. For example, loading an input file and selecting a
                        plugin will trigger the steps from SCALE through SCORE + EXPORT
                        + the selected plugin.
                    </p>
                </article>
            </section>

            <!-- =========================================================== -->

            <section>
                <h2 id="basics">
                    Basics
                </h2>
                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="entities">
                    <h3>
                        Entities
                    </h3>
                    Let's introduce a short number of basic concepts:
                    <img class="right" width="476" height="314"
                         title="Pixels, Runs & Sections" alt="runs-and-sections"
                         src="../images/runs-and-sections.png" />
                    <dl>
                        <dt>Pixel</dt>
                        <dd>A pixel is the smallest picture element in the input image. 
                            A pixel exhibits a specific color, generally a level of 
                            gray.
                            Using a binarization filter, we can separate foreground 
                            (rather black) pixels from background (rather white) pixels.
                        </dd>
                        <dt>Run</dt>
                        <dd>A run is a horizontal or vertical vector of pixels of the
                            same kind (foreground or background).
                            A black (foreground) pixel is "assigned" to exactly one run.
                        </dd>
                        <dt>Section</dt>
                        <dd>A section is a sequence of adjacent black runs, all of the
                            same orientation. 
                            Sections do not overlap, hence a run belongs to exactly one
                            section.</dd>
                        <dt>Glyph</dt>
                        <dd>A glyph is nothing but a set of sections, perhaps from
                            different orientations. A section may belong to many 
                            overlapping glyphs at the same time, but is assigned at any
                            moment to at most one (active) glyph.</dd>
                    </dl>
                    <br class="clear" />
                    <img class="side" title="Horizontal & vertical sections" 
                         width="247" height="225"
                         alt="sections" src="../images/sections.png" />
                    <p >
                        The following picture presents sections at the end of the 
                        <code>GRID</code> step.
                        We can observe:
                    </p>
                    <ul>
                        <li>Unassigned vertical sections, displayed in light blue.</li>
                        <li>Unassigned horizontal sections, displayed in light pink.</li>
                        <li>Horizontal sections assigned to staff line glyphs, and
                            displayed in ivory color.</li>
                    </ul>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="tools">
                    <h3>
                        Main user tools
                    </h3>

                    <h4 id="mouse">
                        Mouse
                    </h4>                        

                    <dl>

                        <dt>Moving</dt>
                        <dd>
                            <p>
                                The page image is usually larger than the 
                                window where the page is displayed.
                                You can move the display over the page using 
                                different means:
                            </p>
                            <ul>
                                <li>
                                    By moving the scroll bars,
                                </li>
                                <li>
                                    By keeping the mouse left button pressed, 
                                    and moving the selection point near a border
                                    of the display,
                                </li>
                                <li>
                                    By keeping both mouse buttons pressed, 
                                    and dragging the image with the selection
                                    point.
                                </li>
                            </ul>
                        </dd>

                        <dt>Zoom</dt>
                        <dd>
                            <p>
                                When modifying the zoom factor, the display will
                                remain focused on the selected entities, if any.
                            </p>
                            <p>
                                It can be adjusted in the range [1:8 to 16:1]
                            </p>
                            <ul>
                                <li>
                                    By using the vertical logarithmic slider
                                    located on the left side of the sheet window.
                                </li>
                                <li>
                                    By using the mouse wheel while keeping the 
                                    <code class="key">CTRL</code> key pressed.  
                                </li>
                                <li>
                                    By using the rectangular "lasso" while 
                                    keeping both the keys
                                    <code class="key">CTRL</code> and
                                    <code class="key">SHIFT</code> pressed. 
                                    When releasing the mouse, the zoom will
                                    be adjusted so that both rectangle sides 
                                    get fully visible.
                                </li>
                                <li>
                                    By using the predefined buttons
                                    <img class="icon" width="16" height="16" 
                                         src="../images/border_horizontal.png" />
                                    and
                                    <img class="icon" width="16" height="16" 
                                         src="../images/border_vertical.png" />,
                                    you can adjust the zoom according to the 
                                    page width or height, respectively.
                                </li>
                            </ul>
                        </dd>

                        <figure class="right">
                            <img title="Tuplet links" alt="tuplet links" 
                                 src="../images/tuplet-links.png"/>
                            <figcaption>
                                Tuplet glyph linked to 3 chords
                            </figcaption>
                            <img title="Head links" alt="head links" 
                                 src="../images/head-links.png"/>
                            <figcaption>
                                Head glyph reused by 2 chords
                            </figcaption>
                        </figure>

                        <dt>Selection modes</dt>
                        <dd>
                            <p>
                                There are 2 selections modes available: 
                                <b>glyph</b>-based (the default) or
                                <b>section</b>-based.
                                To switch from one mode to the other, use the
                                toggle menu item <code>Views</code> | 
                                <code>Enable section selection</code> or the 
                                related toolbar icon
                                <img class="icon" width="16" height="16" 
                                     src="../images/kjumpingcube.png" />
                            </p>
                            <p>
                                The mouse-based selection works as expected, 
                                pointing to either glyph entities or section 
                                entities.
                            </p>
                            <p>
                                In section-selection mode, section boundaries
                                are shown while these boundaries do not appear
                                in glyph-selection mode.
                            </p>
                            <p>
                                In glyph-selection mode, the selected
                                glyph may display links to its related 
                                translated entities.
                                The links appear as short straight lines (and 
                                are driven by the option <code>Views</code> | 
                                <code>Show glyph Translations</code>).
                                <br/>
                                Images next to this paragraph depict: 
                            </p>
                            <ol>
                                <li>
                                    A tuplet glyph linked to its 3 embraced
                                    chords
                                </li>
                                <li>
                                    A note head glyph shared by 2 different 
                                    chords
                                </li>
                            </ol>
                        </dd>

                        <dt>Multi-selection</dt>
                        <dd>
                            <p>
                                A left-click in an entity area selects this 
                                entity (and deselects the entity previously 
                                selected if any).
                            </p>
                            <p>To select several entities:</p>
                            <ul>
                                <li>
                                    Either select each entity, one after the 
                                    other, keeping the <code class="key">CTRL</code>
                                    key pressed.
                                    In section mode, since entities are usually
                                    rather small, you don't need to click on 
                                    each and every section, simply keep the 
                                    mouse pressed and move the pointer over the 
                                    desired sections.
                                </li>
                                <li>
                                    Or, by  dragging the mouse while keeping the 
                                    <code class="key">SHIFT</code> key pressed,
                                    use a rectangular "lasso" to grab all the 
                                    entities whose bounds are fully contained 
                                    by the lasso rectangle.
                                </li>
                            </ul>

                            <p>
                                Whatever the selection mode and the number of 
                                selected entities, a right-click will display a 
                                popup <a href="#context-menu">context menu</a>
                                related to these entities.
                            </p>
                        </dd>
                    </dl>

                    <div id="boards">
                        <h4>
                            Boards
                        </h4>

                        <img class="right" title="boards" alt="boards" 
                             src="../images/boards.png"/>
                        <img class="right" title="Boards selection" 
                             width="175" height="286"
                             src="../images/boards-selection.png" />

                        <p>By a right-click in boards pane, you get access to
                            boards selection, to customize which boards should be 
                            displayed or hidden (this depends on the type of view at
                            hand - picture, runs, data):
                        </p>

                        <dl>
                            <dt>Pixel</dt>
                            <dd>Displays the current position (point or rectangle)
                                in pixels.
                                The <code>Level</code> field gives the level of
                                gray for the selected pixel. 
                                Note that apart <code>Level</code>, all the other 
                                fields are both output and input fields. 
                                Just modify their values and press return to modify
                                the selected location.</dd>

                            <dt>Binarization</dt>
                            <dd>Displays the binarization environment that applies for 
                                the current pixel.</dd>

                            <dt>Run (Hori/Vert)</dt>
                            <dd>Displays the current black Run (horizontal or vertical)
                                if any.</dd>

                            <dt>Section (Hori/Vert)</dt>
                            <dd>Display the current Section (horizontal or vertical) 
                                if any. 
                                The <code>Id</code> field is both output and input,
                                so a section can be directly selected via its ID.
                            </dd>

                            <dt>Glyph</dt>
                            <dd>Displays parameters of the selected Glyph if any.
                                <br/>
                                A glyph is collection of sections, and it is never
                                deleted, therefore it is always accessible via its 
                                <code>Id</code>.
                                <br/>
                                A glyph is said <code>Active</code> if its sections 
                                point back to it, so the selection of one of its 
                                sections will select that glyph.</dd>

                            <dt>Focus</dt>
                            <dd>Allows to browse the whole sheet for specific 
                                shapes.</dd>

                            <dt>Eval</dt>
                            <dd>Displays the result of the glyph evaluation by the 
                                neural network evaluator.
                                <br/>
                                The top 5 best shapes are displayed, with their 
                                related grade in range 0..100.
                                A red background color indicates a shape manually
                                discarded.
                            </dd>

                            <dt>Shape</dt>
                            <dd>The shape palette gives access to shape families.
                                Within a family, a shape can be assigned 
                                (by double-click) or dragged and dropped to a target
                                location.</dd>

                            <dt>Check</dt>
                            <dd>There are several Check boards (Barline, Stem,
                                Ledger). They are meant for the advanced user.</dd>
                        </dl>
                    </div>

                    <div id="context-menu">
                        <h4>
                            Context menu
                        </h4>

                        <img class="side" title="Context menu" 
                             src="../images/context-menu.png" />

                        <p>With a right click in the sheet view, you get a popup menu
                            whose content depends on the current context, notably the 
                            selected glyph if any.
                        </p>

                        <p>
                            Here are the main possibilities:
                        </p>
                        <dl>
                            <dt>Measure #m...</dt>
                            <dd>Information / actions on the current measure.
                                <br/>
                                Note that the displayed measure number is local to the 
                                current page even though the exported measure number 
                                will be score based. 
                                The difference is noticeable only in a multi-page score.
                            </dd>

                            <dt>Slot #s...</dt>
                            <dd>Information / actions on the current time slot within
                                the current measure.</dd>

                            <dt>Chord #c...</dt>
                            <dd>Information / actions on the selected chord(s)
                                in the current time slot.</dd>

                            <dt>Glyphs...</dt>
                            <dd>If a glyph is selected, as depicted in the example shown,
                                many glyph-related actions are enabled, depending on the
                                number of selected glyphs.</dd>

                            <dt>Boundaries...</dt>
                            <dd>This allows to start or stop a series of manual 
                                modifications of system boundaries. 
                                By dragging system boundaries, you can manually
                                and very precisely adjust the broken lines that
                                define inter-system boundaries.
                                When you are done with boundaries modification,
                                stop the session in order to trigger all needed 
                                recomputations.
                            </dd>

                        </dl>
                    </div>

                    <h4 id="score-parameters">
                        Score parameters
                    </h4>
                    <p>This dialog let you display and modify major parameters.
                        It can be accessed through menu <code>Score</code> | 
                        <code>Set parameters...</code> or via the related toolbar icon 
                        <img class="icon" 
                             src="../images/kmenuedit.png" />.
                    </p>
                    <p>
                        It is organized in several tabs to describe default, score and 
                        page scopes:
                    </p>
                    <img title="Default parameters" class="right" 
                         src="../images/parameters-default.png" />
                    <p><code>Default</code> parameters:
                        <br/>
                        (They concern the whole application and persist across 
                        application runs)
                    </p>
                    <dl>
                        <dt>Language</dt>
                        <dd>Define the specification of dominant languages for OCR'ed 
                            text (note that you can select several languages)</dd>
                        <dt>Binarization</dt>
                        <dd>Select the kind of filter (global or adaptive) and adjust
                            the related values.</dd>
                        <dt>Tempo</dt>
                        <dd>Define the default tempo in number of quarters per 
                            minute.</dd>
                        <dt>Plugin</dt>
                        <dd>Define the default plugin to be launched by the 
                            <code>PLUGIN</code> step</dd>
                        <dt>Drag n' Drop</dt>
                        <dd>Define the default step to be performed when an
                            image file is dropped on the application window</dd>
                        <dt>Script</dt>
                        <dd>Prompt the user for saving the current script when
                            closing a score</dd>
                        <dt>On error</dt>
                        <dd>Print out the calling stack whenever any exception
                            is thrown</dd>
                        <dt>Parallelism</dt>
                        <dd>Define whether machine parallelism should be used.</dd>
                    </dl>

                    <p class="clear"></p>
                    <img title="Score parameters" class="right" 
                         src="../images/parameters-score.png" />
                    <p><code>Score</code> parameters:
                        <br/>
                        (They concern just the current score and apply to all pages in 
                        the score, unless otherwise specified at page level)
                    </p>
                    <dl>
                        <dt>Parts</dt>
                        <dd>This section is specific to the score level and is displayed
                            only when step <code>SCORE</code> has been reached.
                            It defines the name and MIDI instrument for each part</dd>
                    </dl>

                    <p class="clear"></p>
                    <img title="Page parameters" class="right" 
                         src="../images/parameters-page.png" />
                    <p><code>Page</code> parameters:
                        <br/>
                        (They override the default or score parameters for the current
                        page. Pages tabs are present only for multi-page scores)
                    </p>
                    <p>
                        Here we are telling Audiveris to use an adaptive binarization
                        filter for this particular page.
                    </p>
                    <p>
                        The two coefficients are adjustable in the adaptive formula:<br/>
                        threshold = <code>meanCoeff</code> * mean + 
                        <code>stdDevCoeff</code> * stdDev;
                    </p>

                    <h4 id="errors-window">
                        Errors window
                    </h4>
                    <p>Several steps are able to detect possible errors and 
                        sometimes to correct them automatically.
                        Remaining errors are displayed in the error window 
                        located at the bottom of the main window.</p>
                    <img class="side" title="Errors window" alt="errors-window"
                         width="356" height="99"
                         src="../images/errors-window.png" />
                    <p>The picture next to this paragraph presents the content of this 
                        window after running <code>SCORE</code> on the example image.
                        If the error window is not displayed, make sure to open
                        it through menu <code>Views</code> | <code>Display 
                            errors window</code>.
                    </p>
                    <p>The errors list is sorted, and every error message begins 
                        with a context indication.
                    </p>
                    <p>For example, the third error says: <code>S3P1M*14 
                            [glyph#3174] PAGES Dot unassigned</code>.
                    </p>
                    <ol>
                        <li>The location of this message is coded as
                            <code>S3P1M*14</code> (System 3, Part 1, Measure 14).
                            The measure number is local to the page, and flagged
                            as such by the '*' character in <code>M*14</code>.
                        </li>
                        <li>There is also a glyph reference: <code>glyph#3174</code>
                        </li>
                        <li>The step which has detected the error: <code>PAGES</code>
                        <li>Finally the message itself: <code>Dot unassigned</code>.
                        </li>
                    </ol>
                    <p>For any error in the list, simply clicking on it will move the 
                        current focus to where the program thinks the error is located.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="glyph-merge">
                    <h3>
                        Glyph merge
                    </h3>
                    <img class="side" title="dot-unassigned" alt="dot-assigned"
                         width="390" height="277" src="../images/dot-unassigned.png" />
                    <p>Let us take the third error signalled in the error window (Dot 
                        unassigned).
                    </p>
                    <p>A dot-shaped glyph is expected to be assigned a precise 
                        shape (augmentation dot, repeat dot, staccato) depending on
                        the surrounding entities.
                        Here none of these assignments was found acceptable.
                        It's a hint that the glyph <code>#3174</code> is perhaps not a 
                        dot.
                    </p>
                    <p>Simply let's click on this error, and the suspicious glyph gets
                        the global focus, as depicted by the image next to this
                        paragraph.
                    </p>
                    <p>Obviously, this glyph is not a dot. What is it? 
                        It seems to be part of a small half circle, which got cut by the
                        image border. Let's try to fix that, by "merging" the two parts
                        of the half circle.
                        <br/>
                        We select the two parts, for example by using a "lasso" as in:
                        <img width="139" height="46" src="../images/lasso.png" />
                    </p>
                    <p>Once the two glyphs are selected, we can click on the 
                        <code>SLUR</code> shape if it appears in the top 5 shapes of 
                        the Eval board. 
                        If not, we use a right-click to get the context popup menu
                        <code>Glyphs...</code> | 
                        <code>Build compound as...</code> | <code>Physicals</code> |
                        <code>SLUR</code>.</p>
                    <p>The two parts are now merged in a single glyph, which is assigned
                        the <code>SLUR</code> shape.</p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="glyph-assignment">
                    <h3>
                        Glyph assignment
                    </h3>
                    <p>The previous section (using a glyph merge) has already used a 
                        glyph assignment (via Eval board or context menu).</p>
                    <p>Let's recap the various assignments ways:</p>
                    <ul>
                        <li>Evaluation board, by clicking in one of the top 5 shapes
                            proposed.</li>
                        <li>Context menu, by navigating to the desired shape by
                            <code>Glyphs...</code> | <code>Assign glyph as...</code>
                            | etc,

                        </li>
                        <li>Shape palette. In the Shape board, open the proper shape
                            set, and use a double-click on the desired shape.
                        </li>
                        <li>Copy / paste a shape from one glyph to another. 
                            Use the context menu on the first glyph and select 
                            <code>Glyphs...</code> | <code>Copy &lt;SHAPE&gt;</code>,
                            then use the context menu on the other glyph and select
                            <code>Glyphs...</code> | <code>Paste &lt;SHAPE&gt;</code>.
                        </li>
                    </ul>
                    <p>We can add another way, using the Glyph board, since clicking
                        on the <code class="button">Deassign</code> button 
                        allows to manually deassign a glyph shape.</p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="glyph-split">
                    <h3>
                        Glyph split
                    </h3>
                    <img class="side" title="no-embraced-note" alt="no-note"
                         width="304" height="318" src="../images/no-note.png" />
                    <p>Let's click on another signalled error, which says:
                        <br/>
                        <code>S3 [glyph#5076] PAGES Slur with no embraced notes</code>
                    </p>
                    <p>Here we have a pack of pixels which results from two overlapping
                        objects, a flag and a rest, and the program has been unable to
                        split this big glyph into proper components.
                        Let's do this manually.</p>
                    <br class="clear"/>
                    <img class="side" title="visible sections" alt="sections"
                         width="204" height="261" src="../images/chula-sections.png"/>
                    <p>We have to work at the section level. 
                        To do so, use <code>Views</code> | <code>Enable section 
                            selection</code>.
                        The sections boundaries are now visible, as you can see on the
                        picture next to this paragraph.
                    </p>
                    <br class="clear"/>
                    <img class="side" title="splitting sections" alt="splitting-sections"
                         width="429" height="250" 
                         src="../images/chula-split-section.png"/>
                    <p>Using the left mouse button, while pressing down the 
                        <code class="key">CTRL</code> key, allows the user to 
                        select as many sections as desired.
                    </p>
                    <p>
                        Since sections are usually small, the selection gesture is a bit
                        simplified when compared to glyph selection:
                        You don't even have to release the mouse button when moving from
                        one section to the other, simply browse the sections as you 
                        would do with an eraser, and all the touched sections will be
                        added to the selection in a "greedy" mode.
                        To really remove a given
                        section from the current selection, release the mouse button and
                        press down the button again on the section to remove (always
                        keeping the <code class="key">CTRL</code> key pressed).
                        <br/>
                        Note, as you select the sections of the "eighth rest" portion of
                        the glyph, that the Eval board continuously tries to recognize
                        a shape out of the selected sections. 
                    </p>
                    <p>
                        When you have selected all the sections that compose the eighth 
                        rest, the <code class="button">EIGHTH_REST</code> button
                        should appear in the top 5.
                        <br/>
                        Simply click on the related button, and the shape is assigned 
                        to a new glyph composed of the selected sections.
                        <br/>
                        [You can also, when your section selection is ready, use
                        a right click to open the context popup menu and use the 
                        <code>Glyphs...</code> | <code>Assign glyph as...</code> item.]
                    </p>
                    <br class="clear"/>
                    <img class="side" src="../images/chula-split-glyph.png" 
                         width="207" height="263"
                         alt="Glyph split" title="Glyph split" />
                    <p>
                        Immediately, the remaining part of the former "big" glyph is
                        recognized as a flag.
                        You can switch back to the normal glyph-level selection mode.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="glyph-insertion">
                    <h3>
                        Glyph insertion
                    </h3>

                    <p>
                        In the section above, we have been lucky that the separation 
                        between the two glyphs could be found by aggregating sections. 
                        But these splits on section borders are not always satisfactory.
                        In that case, the solution is to inject the needed glyphs 
                        directly into the sheet structure.
                    </p>
                    <img class="side" title="Cleaned glyph" alt="cleaned glyph"
                         width="483" height="154" src="../images/cleaned-glyph.png" />
                    <p>
                        For the sake of example, let's suppose that the split above had
                        not been performed. 
                        So, we still have this big glyph instead of clearly
                        separated flag glyph and eighth rest glyph. So we'll inject them.
                    </p>
                    <p>
                        First let's get rid of assigned shapes (<code>FLAG_1</code> and
                        <code>SLUR</code>), by using the 
                        <code class="button">Deassign</code> button,
                        until no more shape is assigned.
                        <br/>
                        Note that when a shape is manually deassigned, the program tries
                        to assign another shape, hence the need for perhaps multiple
                        deassignments.
                        We could also directly assign a <code>CLUTTER</code> shape, to
                        avoid these multiple deassignments.
                        The picture presents the "cleaned" glyph.
                    </p>
                    <br class="clear"/>
                    <img class="side" title="Flag being dragged" alt="dragged flag" 
                         width="303" height="181"
                         src="../images/chula-dragged-flag.png" />
                    <p>
                        In the shape palette, we now select the range dedicated to
                        flags, and then drag the suitable flag shape from the palette 
                        to the sheet view. 
                        In the picture, you can see the ghost image of the flag 
                        being dragged.
                    </p>
                    <p>
                        We pay attention to correctly position the flag along the stem,
                        and we release the mouse button.
                    </p>
                    <br class="clear"/>
                    <img class="side" title="Virtual flag and virtual rest" 
                         alt="Virtual glyphs" width="130" height="150"
                         src="../images/chula-virtual-glyphs.png" />

                    <p>
                        We perform a similar action for the eighth rest, and we have
                        reached the final result.
                    </p>


                    <p>
                        Just a couple of remarks:
                    </p>
                    <ul>
                        <li>For certain shapes, like the flag, it is important to 
                            position the glyph with a rather good precision, otherwise 
                            the distance between the stem and this flag may be larger 
                            than the tolerated margin, and the stem and the flag will 
                            not be recognized as connected.
                        </li>
                        <li>For the time being, the DnD is rudimentary: once a glyph has
                            been dropped, it cannot be moved. The only workaround is to 
                            delete this virtual glyph (by deassigning it) and reperform
                            the DnD.
                        </li>

                        <li>Another current limitation is that there is yet no way to
                            resize a virtual glyph. So DnD does not really work for such
                            shapes as beams, slurs, crescendos, descrescendos, ... 
                            These moving / resizing features are postponed until we 
                            integrate a more powerful way to play with glyphs and shape 
                            display (certainly the NetBeans Visual Lib).
                        </li>
                    </ul>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="text-correction">
                    <h3>
                        Text correction
                    </h3>
                    <p>
                        Text-shaped items are processed by the OCR engine to retrieve
                        their actual content.
                    </p>
                    <p>
                        Make sure to select the proper language to get the best OCR 
                        results.
                        You can still change the language afterwards to automatically
                        recall OCR on the detected words, but the best results are 
                        achieved when the right language is chosen upfront.
                    </p>
                    <p>
                        Even with proper language selected, some texts are not correctly
                        OCR'ed.
                    </p>
                    <ul>
                        <li>In the Chula example at hand, the number "<code>31</code>"
                            was not detected in the upper right corner. 
                            The solution is to select the glyph by a "lasso" and assign
                            the TEXT shape. This triggers the OCR, which should 
                            recognize the proper digits.
                        </li>
                        <li>
                            Some words may be assigned a wrong OCR value.
                            To fix this, select the related glyph and in the text field
                            of the Glyph board, directly type the correct word value. 
                            You can also modify other attributes of the textual glyph,
                            such as the text role or the text type.
                        </li>
                    </ul>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="whole-examples">
                    <h3>
                        Wiki on whole examples
                    </h3>
                    <p>
                        A <a href="http://kenai.com/projects/audiveris/pages/Home">
                            Wiki</a> is available online to document
                        the use and evolution of Audiveris software.
                    </p>
                    <p>
                        Audiveris is installed with a hand-full of typical 
                        input files located in the <code>examples</code> folder
                        of program installation directory.
                        Almost all pictures used in this handbook are snapshots
                        of these examples.
                        The processing of these simple examples is documented 
                        in this 
                        <a href="http://kenai.com/projects/audiveris/pages/SimpleExamples">
                            Wiki page</a>.
                    </p>
                    <p>
                        Another source of examples is the online repository of
                        MusicXML examples as available on 
                        <a href="http://www.makemusic.com/musicxml/music/example-set">
                            MakeMusic site</a>.
                        There you can find a large dozen of examples with their
                        PDF input and their XML / MXL outputs.
                        These are good quality PDF files which exhibit a wide
                        set of representative music features.
                    </p>
                    <p>
                        Actually, one of the objectives of Audiveris 4.2 release
                        was to be able to process these former Recordare 
                        examples with as good results as possible, even if some
                        manual processing was still necessary.
                        The detailed processing of each of these examples is 
                        documented in the dedicated  
                        <a href="http://kenai.com/projects/audiveris/pages/RecordareExamples">
                            Wiki page</a>.
                        Browsing this Wiki should give you a more realistic view
                        of concrete Audiveris processing and manual interactions.
                    </p>
                </article>
            </section>

            <!-- =========================================================== -->

            <section>
                <h2 id="advanced">
                    Advanced
                </h2>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="arguments">
                    <h3>
                        Arguments
                    </h3>

                    <p>
                        As we have seen in the <a href="#jws">Java Web Start</a>
                        section, Audiveris can be launched from the command line
                        via the <code>javaws</code> program.
                        However, this program accepts a limited set of arguments.
                        Type <code>javaws</code> alone to get a description of
                        possible arguments.
                    </p>
                    <p>
                        <code>javaws</code> accepts JVM arguments but no 
                        application arguments, at least directly.
                    </p>
                    <p>
                        A much more versatile way is to go through the 
                        <code>jnlp</code> file itself.
                        This is a basic XML file which describes how to retrieve
                        and launch the Java application.
                        It is this file which is hyperlinked by the
                        <code class="button">Launch</code> button on Audiveris 
                        web page and which is also referred to by the 
                        <code>javaws</code> command.
                    </p>
                    <p>
                        The URL of this jnlp file is 
                        <code>https://audiveris.kenai.com/jnlp/launch.jnlp</code>.
                        You can simply download this file and modify it locally 
                        with a text editor.
                        Then use a double-click on the local file or use a 
                        <code>javaws</code> command pointing to the local file
                        instead of the remote one.
                    </p>

                    <h4 id="jvm-arguments">
                        JVM arguments
                    </h4>
                    <p>
                        Many kinds of arguments can be provided to the Java 
                        Virtual Machine.
                    </p>
                    <p>
                        A typical use is to define the maximum amount of memory 
                        available, via the <code>-Xmx</code> option, for example
                        <code>-Xmx512M</code> for 512 megabytes, 
                        or <code>-Xmx2G</code> for 2 gigabytes.
                        (Please note that you cannot practically go beyond the 
                        physical memory available on your machine, otherwise
                        memory swapping will severely impact the processing 
                        speed).
                        Similarly, the <code>-Xms</code> option defines the
                        initial amount of memory.
                    </p>
                    <p>
                        JVM arguments can be provided via the <code>javaws</code>
                        command line and via the <code>jnlp</code> file:
                    </p>
                    <dl>
                        <dt>javaws command</dt>
                        <dd>
                            <p>Use the javaws <code>-J</code> option for each
                                JVM argument.
                                For example, to specify initial and maximum
                                memory values, you can use something like:
                            </p>
                            <p>
                                <code class="indent">javaws -J-Xms512m -J-Xmx1024m
                                    https://audiveris.kenai.com/jnlp/launch.jnlp</code>
                            </p>
                            <p>
                                Mind the fact that there is no space between the 
                                "-J" prefix and the actual JVM argument.
                            </p>
                        </dd>                        
                        <dt>jnlp file</dt>
                        <dd>
                            <p>
                                In the (local) file, look for the 
                                <code>&lt;resources&gt;</code> element and the
                                contained <code>&lt;java&gt;</code> element.
                                Then modify the <code>java-jvm-args</code> 
                                attribute as you wish, for example:
                            </p>

                            <pre id="jvm-snippet" class="snippet">
[...]
&lt;resources&gt;
    &lt;java href="..." version="..." <b>java-vm-args="-Xms512m -Xmx1024m"</b> /&gt;
    [...]
&lt;/resources&gt;
[...]</pre>

                        </dd>                        
                    </dl>

                    <h4 id="appli-arguments">
                        Application arguments
                    </h4>

                    <p>
                        Application arguments can only be provided through the
                        jnlp file.
                    </p>
                    <p>
                        In the (local) file, look for the 
                        <code>&lt;application-desc&gt;</code> element.
                        Then insert there as many <code>&lt;argument&gt;</code>
                        elements as you wish.
                    </p>
                    <p>
                        Perhaps the most typical use of such arguments is to run
                        Audiveris in batch.
                        For example, to open the input file 
                        <code>myFile.pdf</code> and transcribe it in batch to
                        the output file <code>myFile.xml</code>, you would use 
                        something like:
                    </p>

                    <pre id="appli-snippet" class="snippet">
[...]
&lt;application-desc main-class="Audiveris"&gt;
    <b>&lt;argument&gt;-batch&lt;/argument&gt;
    &lt;argument&gt;-input&lt;/argument&gt;
    &lt;argument&gt;path/to/myFile.pdf&lt;/argument&gt;
    &lt;argument&gt;-export&lt;/argument&gt;
    &lt;argument&gt;path/to/myFile.xml&lt;/argument&gt;</b>
&lt;/application-desc&gt;
[...]</pre>
                    <p>Here is the summary you get when launching Audiveris with the 
                        <code>-help</code> argument:</p>

                    <textarea id="cli-snippet" class="snippet" rows="29">
Version:
   4.2.3374
Arguments syntax:
   [-help]                             Prints help about command line interface and stops
   [-batch]                            Specifies to run with no graphic user interface
   [-step (STEPNAME|@STEPLIST)+]       Defines a series of target steps
   [-option (KEY=VALUE|@OPTIONLIST)+]  Defines a series of key=value constant pairs
   [-script (SCRIPTNAME|@SCRIPTLIST)+] Defines a series of script files to run
   [-input (FILENAME|@FILELIST)+]      Defines a series of input image files to process
   [-pages (PAGE|@PAGELIST)+]          Defines a set of specific pages to process
   [-bench (DIRNAME|FILENAME)]         Defines an output path to bench data file (or directory)
   [-print (DIRNAME|FILENAME)]         Defines an output path to PDF file (or directory)
   [-export (DIRNAME|FILENAME)]        Defines an output path to MusicXML file (or directory)
       
Known step names are in order (non case-sensitive):
   LOAD        : Reload the sheet picture
   SCALE       : Compute general scale
   GRID        : Retrieve the grid of all systems
   SYSTEMS     : Split all data per system
   MEASURES    : Retrieve Measures from Bar sticks
   TEXTS       : Retrieve texts items in each system area
   STICKS      : Extract vertical & horizontal sticks
   SYMBOLS     : Apply specific glyph patterns
   PAGES       : Translate glyphs to score items
   SCORE       : Merge all pages into one score

   PRINT       : Write the output PDF file
   EXPORT      : Export the score to MusicXML file
   PLUGIN      : Launch the default plugin (MuseScore)
                    </textarea>

                    <p>More explanation on Audiveris arguments:</p>
                    <dl>
                        <dt>-help</dt>
                        <dd>Displays the arguments summary as printed above.</dd>
                        <dt>-batch</dt>
                        <dd>Launches Audiveris without any Graphic User Interface.</dd>
                        <dt>-step (STEPNAME | @STEPLIST)+</dt>
                        <dd>Performs all the specified steps (automatically
                            including the steps which are mandatory to get to 
                            the specified ones).
                            <br>
                            'STEPNAME' can be any one of the step names (the case is
                            irrelevant).
                            <br/>
                            These steps will be performed on each sheet referenced from
                            the command line.
                        </dd>
                        <dt>-option (KEY=VALUE | @OPTIONLIST)+</dt>
                        <dd>Specifies the value of some application parameters (that can
                            also be set via the pull-down menu <code>Tools</code> |
                            <code>Options</code>).
                            <br/>
                            You can state key=value pairs or reference an options file 
                            (flagged by an @ sign) that lists key=value pairs (or
                            even other files recursively).
                            <br/>
                            A list file is a simple text file, with one key=value pair
                            per line.
                            <b>Nota</b>: The syntax used is the Properties syntax, so 
                            for example back-slashes must be escaped.</dd>
                        <dt>-script (SCRIPTNAME | @SCRIPTLIST)+</dt>
                        <dd>Specifies some scripts to be read, using the same mechanism 
                            as input command below.
                            <br/>
                            These script files contain actions generally recorded during
                            a previous run.
                        </dd>
                        <dt>-input (FILENAME | @FILELIST)+</dt>
                        <dd>Specifies some image files to be read, either by naming the 
                            image file or by referencing (flagged by an @ sign) a file
                            that lists image files (or even other files list recursively).
                            A list file is a simple text file, with one image file name
                            per line.</dd>
                        <dt>-pages (PAGE | @PAGELIST)+</dt>
                        <dd>Specifies some specific pages to be loaded, either by naming the 
                            page number (counted from 1) or by referencing (flagged by an @ sign)
                            a file that lists page numbers (or even other page list recursively).
                            A page file is a simple text file, with one page number
                            per line.</dd>
                        <dt>-bench (DIRNAME | FILENAME)</dt>
                        <dd>Defines an output path to bench data file (or directory).
                            <br/>
                            This bench data is meant for application monitoring only.
                            <br/>
                            <b>Nota</b>: If the path refers to an existing directory, 
                            each processed score will output its bench data to a score
                            specific file created in the provided directory. Otherwise,
                            all bench data, whatever its related score, will be written
                            to the provided single file.</dd>
                        <dt>-print (DIRNAME | FILENAME)</dt> 
                        <dd>Defines an output path to PDF file (or directory).
                            <br/>
                            Same note as for -bench option.</dd>
                        <dt>-export (DIRNAME | FILENAME)</dt>
                        <dd>Defines an output path to MusicXML file (or directory).
                            <br/>
                            Same note as for -bench option.</dd>
                    </dl>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="log">
                    <h3>
                        Log
                    </h3>

                    <p>
                        All messages displayed in Audiveris log window are also 
                        written into a file called <code>audiveris.log</code>.
                        Such log is a simple text file meant for later analysis,
                        and in particular is very useful when filing a bug 
                        report or posting a message on Audiveris forum.
                    </p>
                    <p>
                        The <code>audiveris.log</code> file is by default
                        located in the <code>temp</code> folder of 
                        <a href="#user-data">user data</a>.
                        Path and file name can be changed by setting the system
                        property <code>stdouterr</code> through a JVM option
                        as follows:<br/>
                        <code>-Dstdouterr=path/to/some-file.log</code>
                    </p>
                    <p>
                        The advanced user can precisely customize the logged
                        information by manually editing the configuration file
                        <code>logging.properties</code> located in the 
                        <code>settings</code> folder of <a href="#user-config">
                            user config</a>.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="script">
                    <h3>
                        Script
                    </h3>
                    <p>Every user action that can impact the result is recorded in the 
                        current score script. 
                    </p>
                    <p>
                        By default, you are prompted to save the script when the score 
                        is closed.
                        You can override this behavior via the menu <code>Score</code> | 
                        <code>Set parameters...</code> or directly by setting the 
                        constant <code>omr.script.ScriptActions.closeConfirmation</code>.
                    </p>
                    <p>
                        For example, say you load the file 
                        <code>Dichterliebe01.pdf</code>, set
                        the default language to German (code is <code>deu</code>) in the 
                        score parameters, for the first page decide to use an
                        <code>adaptive</code> binarization and finally launch the 
                        <code>EXPORT</code> step.
                        You should get the following script 
                        (<code>Dichterliebe01.script.xml</code>):
                    </p>
                    <figure id="script-snippet" class="snippet">
                        <pre>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;<code>script</code> file="D:\soft\audiveris\examples\Dichterliebe01.pdf"&gt;
    &lt;<code>parameters</code>&gt;
        &lt;<code>language</code>&gt;deu&lt;/<code>language</code>&gt;
        &lt;<code>page</code> index="1"&gt;
            &lt;<code>adaptive-filter</code> mean-coeff="0.7" std-dev-coeff="0.9"/&gt;
        &lt;/<code>page</code>&gt;
    &lt;/<code>parameters</code>&gt;
    &lt;<code>step</code> name="EXPORT"/&gt;
&lt;/<code>script</code>&gt;</pre>
                        <figcaption>Example of Dichterliebe01 script</figcaption>
                    </figure>
                    <p>Such scripts can be replayed later. Knowledgeable users can even
                        write scripts from scratch and typically submit them in
                        batch mode.
                    </p>
                    <p>
                        A script can be launched via the command line, via the menu
                        <code>File</code> | <code>Load script</code>, or via 
                        drag n' drop from the file explorer.                    
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="plugins">
                    <h3>
                        Plugins
                    </h3>
                    <p>The <code>Plugins</code> menu is based on the content of the
                        <code>plugins</code> folder of Audiveris. 
                        Each file, with a <code>.js</code> extension, found in this 
                        folder gives birth to a corresponding item in the Plugins menu.
                    </p>
                    <figure class="right snippet" id="plugins-snippet">
                        <pre title="Example of MuseScore plugin">
/* ------------------------------------------------ */
/*              m u s e s c o r e . j s             */
/* ------------------------------------------------ */
    
/* Variable to modify according to your environment */
var <code title="Local path to MuseScore"><b>pathToExec</b></code> = "P:/MuseScore/bin/mscore.exe";
    
/* Title for menu item */
<code title="Menu item"><b>pluginTitle</b></code> = 'MuseScore';
    
/* Long description for tool tip */
<code title="User tip"><b>pluginTip</b></code> = 'Invoke MuseScore on score XML';
    
/* Build sequence of command line parameters */
function <code title="Function to implement"><b>pluginCli</b></code>(exportFilePath) {
    importPackage(java.util);
    return Arrays.asList([pathToExec, exportFilePath]);
}</pre>
                        <figcaption>Example of MuseScore plugin</figcaption>
                    </figure>
                    <p>Let's take the example of <code>musescore.js</code> plugin:</p>
                    <p>The purpose of a plugin file is to describe the way an executable
                        must be launched.
                        Note that the plugin does not actually call the
                        executable, Audiveris Java application does this, based on the
                        informations provided by the plugin.</p>
                    <p>The plugin is implemented as a small piece of 
                        JavaScript with just 4 items:
                    </p>
                    <dl>
                        <dt class="high">pathToExec</dt>
                        <dd>This local variable defines the exact path to the executable
                            as installed on your own environment.
                            Generally, this item is the only one which needs to be 
                            customized.</dd>
                        <dt class="high">pluginTitle</dt>
                        <dd>This variable defines the title to be used by the related
                            menu item.</dd>
                        <dt class="high">pluginTip</dt>
                        <dd>This variable defines a longer string, to be displayed as
                            the tip related to the menu item.</dd>
                        <dt class="high">pluginCli</dt>
                        <dd>This is a function provided with the single parameter 
                            <code>exportFilePath</code> which contains the path to the 
                            MusicXML file exported by Audiveris. 
                            The returned value must be the precise sequence of command
                            arguments used when launching the target executable.</dd>
                    </dl>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="options">
                    <h3>
                        Options
                    </h3>

                    <p>
                        This interface, accessible from menu <code>Tool</code> | 
                        <code>Options</code>, allows to interactively display and
                        modify data related to Audiveris classes.
                        This is a low level yet powerful way to handle nearly 
                        all application data.
                    </p>
                    <p>
                        The display combines a tree of classes on the left side, and a 
                        table on the right side, where details of the logical constants
                        from the containing classes are available for display and 
                        modification.
                    </p><img src="../images/options.png"  alt="options"
                             width="782" height="431"
                             title="User Interface to edit options" />
                    <p>
                        The picture represents a typical Options view:
                    </p>
                    <ol>
                        <li>We are in the package named <code>util</code>, (actually, 
                            its full name is <code>omr.util</code>, but we drop
                            the ubiquitous <code>omr.</code> prefix) and the class named
                            <code>OmrExecutors</code>, in charge of the tasks handling.
                        </li>
                        <li>This class has a logging level, currently assigned to 
                            <code>INFO</code>. This information comes from the
                            <code>settings/logging.properties</code> file, but can be 
                            modified on the fly, thanks to this interface, to any
                            legal logging value (such as DEBUG, INFO, etc...).
                            <br/>
                            <b>NOTA</b>: these logging level modifications are meant
                            to be temporary, and thus not stored on disk. For persistent 
                            modification, please edit the logging property file directly.
                        </li>
                        <li>The class also contains some logical constants, which are
                            application-level parameters, whose precise value is kept 
                            separate from the algorithmic code. 
                            <br/>
                            For example, the constant <code>useParallelism</code> 
                            is an instance of <code>Constant.Boolean</code> class.
                            If set to true (its default value) it allows to take
                            advantage of all physical processors available.
                        </li>

                    </ol>
                    <p>To ease the retrieval of pertinent constants, you can use the
                        search field located in the upper part of the Options window.
                        Here, we have just entered the string "parallel" in this field.
                    </p>
                    <p>
                        How do we define the current value of such logical constant?
                        The JavaDoc of class <code>omr.constant.ConstantManager</code>
                        explains the mechanism in details. 
                        In short, the overriding sequence is defined as follows, from 
                        lower to higher priority:
                    </p>
                    <ol>
                        <li>SOURCE: The default value as defined in the source code,
                        </li>
                        <li>USER: The value, if any, found in file <code>
                                run.properties</code>,
                        </li>
                        <li>CLI: The value, if any, specified in the command line by a
                            <code>-option key=value</code>. 
                            The CLI value is persisted in the USER file when running in 
                            interactive mode, and not persisted when running in batch.
                        </li>
                        <li>UI: The value, if any, specified through the 
                            <code>Tools</code> | <code>Options</code> user interface. 
                            These UI values are persisted in the USER file.
                        </li>
                    </ol>
                    <p>
                        If ever you want to get back to the SOURCE value of a 
                        constant, and discard the modifications you have made,
                        simply check the related box in the Log/Modif column.
                    </p>
                    <p>To restore the SOURCE value for <b>all</b> constants,
                        use the <code class="button">Reset</code>  button 
                        located at the top of the Options window.
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="training">
                    <h3>
                        Training
                    </h3>

                    <p>
                        Audiveris has the ability to train the underlying Neural Network 
                        evaluator with representative samples.
                    </p>
                    <p>
                        Note that the program is released with a pre-trained evaluator
                        so the casual user can safely ignore this training section.
                        However, if the score(s) you want to transcribe use some 
                        specific music font significantly different from the provided
                        examples, you may consider training the evaluator to better fit
                        your case.
                    </p>

                    <h4 id="persist-manuals">
                        Persistence of manual assignments
                    </h4>

                    <img title="Persist Manuals" class="side" width="275" height="194"
                         src="../images/persist-manuals.png" />

                    <p>
                        You can set a mode in which any manual assignment will be saved
                        as a training sample. 
                        This allows to record any isolated sample on the fly and thus make
                        it available for a future training of the shape evaluator.
                        <br/>
                        This data is saved under the <code>/train/samples</code> folder.
                    </p>
                    <p>
                        This mode is disabled by default.
                        To enable the feature, use the
                        menu item <code>Tools</code> | <code>Persist Manuals</code>.
                        From that point on, any manually assigned glyph will be saved,
                        until the program is exited or the mode is manually reset.
                    </p>


                    <h4 id="save-score-samples">
                        Saving all score samples
                    </h4>

                    <img title="Save Score Samples" class="side" width="292" height="195"
                         src="../images/save-samples.png" />

                    <p>
                        Another possibility, when you are really confident with
                        all the glyphs recognized in the current sheet, is to 
                        save as a whole the complete set of glyphs as training 
                        samples.
                        <br/>
                        This data is saved under the <code>/train/sheets</code>
                        folder.                   
                    </p>
                    <p>
                        <b>NOTA:</b> This possibility is very powerful but
                        requires a careful manual inspection beforehand.
                    </p>

                    <h4 id="sample-verifier">
                        Sample verifier
                    </h4>

                    <p>
                        The purpose of this "Sample Verifier" is to provide a user 
                        interface to visually review some or all of the
                        various glyphs which are used for training the evaluator.
                    </p>

                    <p>
                        The main objective is thus to easily identify samples which have
                        been assigned a wrong shape. 
                        Using them as part of the training base could severely impact
                        the recognition efficiency of the evaluator. 
                        So the strategy, when such a wrong glyph has been identified, 
                        is simply to delete the glyph from the base.
                    </p>
                    <img src="../images/training_material.png" alt="Sample verifier"  
                         title="User Interface to verify the training samples" 
                         class="right" width="644" height="507"/>
                    <p>
                        Here is an example of the glyph verifier.
                        The top panels are dedicated to selectors, in that order:
                    </p>
                    <dl>
                        <dt>Folders<dt> 
                        <dd>This selector allows to select one or several folders to 
                            search for training material within:
                            <ul>
                                <li><code>/train/symbols</code> for artificial symbols,</li>
                                <li><code>/train/samples</code> for isolated samples,</li>
                                <li><code>/train/sheets</code> for whole sheets.</li>
                            </ul>
                        </dd>
                        <dt>Shapes</dt>
                        <dd>This selector displays only the shapes contained in the 
                            folders selected.
                            Select your shapes of interest.
                        </dd>
                        <dt>Glyphs</dt>
                        <dd>This selector displays only the glyphs corresponding to
                            the shapes selected (within the folders selected). 
                            Select your glyphs of interest.
                        </dd>
                    </dl>
                    <p>
                        The large panel, on the lower right side, is dedicated to the 
                        display of the selected glyphs, using their own coordinates. 
                        Notice that glyphs that belong to separate sheets can happen to 
                        have close coordinates and thus be displayed as overlapping 
                        glyphs.
                    </p>
                    <p>
                        The lower left panel is composed of two main parts:
                    </p>
                    <ol>
                        <li>The <b>Sample</b> navigator drives the loading and display
                            of glyphs from the selection that comes out of the selectors.
                            You can browse through the loaded glyphs.
                        </li>

                        <li>The <b>Glyph</b> panel, similar to the Glyph board that 
                            appears on the main Audiveris windows, is used to display 
                            information about the glyph at hand, together with the 
                            evaluations performed by the Neural Network evaluator. 
                            The <code class="button">Remove</code> button can 
                            be used to discard a wrong glyph: 
                            this is implemented through the mere deletion of the 
                            underlying glyph XML file.
                        </li>
                    </ol>
                    <p>
                        By default, this user interface looks for glyphs files under
                        the <code>/train</code> directory.
                        However, from the <a href="#trainer">Trainer</a> user interface,
                        you can ask to <b>Verify</b> glyphs. 
                        In that case, the <b>Sample verifier</b> interface is 
                        automatically loaded with the glyphs that failed the validation.
                    </p>

                    <h4 id="trainer">
                        Trainer
                    </h4>
                    <p>
                        This interface is dedicated to the training of the Neural
                        Network evaluator.
                    </p>
                    <img class="right" width="645" height="396" 
                         src="../images/trainer.png" alt="Trainer"
                         title="User Interface to train the evaluator"  />
                    <dl>
                        <dt>Selection</dt>
                        <dd>
                            <p>
                                This panel is in charge of selecting and loading the glyph 
                                XML files, as stored from the predefined symbols and from
                                previous sheet recognitions.
                            </p>
                            <p>
                                Use the <code class="button">Select Core</code>
                                button when you want to identify a 
                                representative <b>Core</b> part within the 
                                whole glyph base.
                                The <code>/train/core</code> directory will be emptied 
                                and repopulated by the core selected glyph files.
                            </p>
                        <dt>Neural Training</dt>
                        <dd>
                            <p>
                                Here we launch and monitor the training of the neural 
                                network.
                                <br/>
                                On the left, radio buttons allow to select either the 
                                <code class="button">Whole</code> base (default option) or the 
                                <code class="button">Core</code> base.
                            </p>
                            <p>The main decision is to choose between a 
                                <code class="button">Re-Train</code>, which consists in retraining from
                                scratch, or only an <code class="button">Inc-Train</code>, which works
                                incrementally on top of the previous training sessions.
                            </p>
                            <p>For the advanced user, several convergence parameters can
                                be adjusted (although they should be kept close to their 
                                default values): the <code>Momentum</code> and
                                <code>Learning Rate</code>.
                            </p>
                            <p>The training ends when any of the thresholds <code>Max 
                                    Error</code> (residual error) or <code>Epochs</code>
                                (number of iterations) is reached, or when the 
                                <code class="button">Stop</code> button is manually pressed.
                                The trainer continuously stores on disk the snapshot of
                                the latest best configuration. 
                                This is the default behavior, but you can also force the 
                                trainer, via the <code class="button">Use Last</code> button, to select
                                only the last configuration.
                            </p>
                        </dd>

                        <dt>Validation</dt>
                        <dd>
                            <p>
                                At any time, even while the neural network is being trained,
                                you can test the evaluator against the selected population 
                                (either the Whole base, or the Core base, according to the
                                selection made via the radio buttons. Note that we can train
                                and validate on different bases).
                            </p>
                            <p>
                                The samples which are either not recognized or (worse) 
                                mistaken for another shape are pointed out.
                                The corresponding <code class="button">Verify</code> buttons launch the 
                                <a href="#sample-verifier">Sample verifier</a> on the 
                                questionable samples to allow a visual check and perhaps 
                                the removal of some of them.</p>
                        </dd>

                        <dt>Regression Training</dt>
                        <dd>
                            <p>
                                This allows to compute the parameters of a linear evaluator,
                                which is less and less used. You can safely ignore this.
                            </p>
                        </dd>
                    </dl>
                </article>

            </section>

            <!-- =========================================================== -->

            <section>
                <h2 id="internals">
                    Internals
                </h2>
                <p>Audiveris is not just a music scanning program.
                    It is also a tool meant to ease the analysis and the 
                    development of OMR techniques.
                </p>
                <p>
                    To this end, Audiveris is released with an open source license,
                    and this chapter details the purpose and the outputs
                    of each formalized program step.
                </p>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="load-step">
                    <h3>
                        Load step
                    </h3>
                    <p>This step is usually implicit. Loading an input file, regardless
                        how this file is selected, is considered as performing the 
                        <code>LOAD</code> step.
                        At the end of this step, each page of the input file is 
                        displayed as a separate tab in the main window.
                    </p>
                    <p>
                        At any time, by manually selecting the menu <code>Steps</code> |
                        <code>Load</code>, you can force the program to reload the 
                        current page and reach again the same final mandatory step.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="scale-step">
                    <h3>
                        Scale step
                    </h3>            
                    <p>
                        Before any digital processing can take place, each pixel must be
                        extracted from the image and flagged as either foreground or 
                        background:
                    </p>
                    <ul>
                        <li>
                            The default binarization filter uses a <b>global</b> 
                            approach, based on a single threshold value for all pixels 
                            of the image. 
                            All pixels with a gray level which is less than or equal to
                            the threshold are considered as foreground, the others as 
                            background.
                            This approach assumes that the image illumination is 
                            rather uniform.
                        </li>
                        <li>
                            For images with non-uniform illumination, you can select an
                            <b>adaptive</b> filter, which determines the threshold value
                            for each pixel individually, by using mean value and 
                            standard deviation in a small window around the pixel at 
                            hand.
                        </li>
                    </ul>

                    <img title="Non-uniform image" 
                         src="../images/nonuniform-picture.png" class="right" />
                    <p>Example of a non uniform input image, which exhibits a horizontal
                        illumination gradient:</p>

                    <p class="clear">
                        Nota: The internal runs tables are not displayed by 
                        default.
                        To get the related displays you have to set the constant 
                        <code>omr.grid.GridBuilder.showRuns</code> to true.
                    </p>
                    <img title="Global filter" 
                         src="../images/nonuniform-global.png" class="right" />
                    <p>Binarization with the <b>global</b> filter:
                        Too much pepper on the left, too much salt on the right!
                    </p>

                    <p class="clear"></p>
                    <img title="Adaptive filter" 
                         src="../images/nonuniform-adaptive.png" class="right" />
                    <p>Binarization with the <b>adaptive</b> filter:
                        The whole staff is now readable.</p>

                    <p class="clear">
                        Now that it can pick up just the foreground pixels, 
                        the program can aggregate them into vertical runs.
                        And simply by analyzing the histograms of run lengths for 
                        foreground pixels (and for background pixels as well), it
                        retrieves key information about the music sheet.
                    </p>
                    <p>
                        Via <code>File</code> | <code>Display Scale Plots</code> you
                        can display both histograms.

                    </p>
                    <img title="Foreground runs" width="732" height="454"
                         src="../images/chula-scale-black.png" class="right" />
                    <p>In this example, the foreground histogram indicates a peak at 
                        value <code>3</code>
                        which corresponds to the mean staff line thickness.</p>
                    <p>If there is no peak above the <code>10%</code> quorum, the image
                        is not likely to contain music staves.</p>
                    <p>The sharpness of this peak is also a good indication of the
                        scan quality and the width at <code>15%</code> is used to define
                        line margins.
                    </p>
                    <p>The second foreground peak value at <code>12</code> is the second
                        frequent height and thus corresponds to average beam height.
                    </p>
                    <p class="clear"></p>
                    <img title="Background runs" width="732" height="454"
                         src="../images/chula-scale-white.png" class="right" />
                    <p>Similarly, the main background peak at <code>18</code> relates
                        to the average background distance from one staff line to the
                        other.
                    </p>
                    <p>Adding foreground peak value <code>3</code> and background 
                        peak value <code>18</code> leads to <code>21</code>, which
                        is now considered as the main interline value and thus the 
                        key scaling factor for the sheet at hand. 
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="grid-step">
                    <h3>
                        Grid step
                    </h3>

                    <figure class="right">
                        <img title="Grid of staves and barlines"
                             src="../images/warped-grid.png" />
                        <figcaption>
                            Staff lines implemented as natural splines
                        </figcaption>
                    </figure>
                    <p>By aggregating long horizontal sections into filaments, and
                        gathering them into clusters of vertically spaced 
                        filaments, Audiveris retrieves staves skeletons.
                    </p>
                    <p>
                        Similarly, long vertical sections are aggregated into barline 
                        filaments.
                    </p>
                    <p>
                        The crossing of these horizontal and vertical filaments, 
                        sometimes fairly wavy, represents a kind of "grid".
                        Because such filaments are often far from being straight lines,
                        they are implemented as natural splines (sequences of bezier
                        curves with continuity up to the second derivative).
                    </p>    
                    <p>
                        From that point on, this grid is taken as the geometric 
                        referential for all other entities.
                        Note that this intrinsic referential allows Audiveris to 
                        directly cope with skewed page and / or wavy lines with no
                        deskewing or other processing.
                    </p>
                    <p>
                        If you wish, you can still ask Audiveris to produce a "dewarped"
                        image, by using the referential as the dewarping grid.
                        Doing so, Audiveris <code>GRID</code> step can also be used as
                        a standalone image dewarping preprocessor.
                        <br/>
                        To compute and display the dewarped image, simply set the 
                        constant <code>omr.grid.GridBuilder.buildDewarpedTarget</code>
                        to true, 
                        and to save the dewarped image to disk set the constant 
                        <code>omr.grid.TargetBuilder.storeDewarp</code> to true.
                    </p>
                    <p>
                        See below the differences between the initial (warped) 
                        image and the final (dewarped) image. 
                        Note the pixels colors are not modified, only their 
                        coordinates are.
                    </p>

                    <figure id="warped">
                        <img title="Warped" src="../images/warped-input.png"/>
                        <figcaption>Initial warped image</figcaption>
                    </figure>

                    <figure id="dewarped">
                        <img title="Dewarped" src="../images/dewarped-output.png"/>
                        <figcaption>Final dewarped image</figcaption>
                    </figure>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="systems-step">
                    <h3>
                        Systems step
                    </h3>
                    <figure class="right">
                        <img title="Edition of system boundaries"
                             src="../images/boundary-edition.png" />
                        <figcaption>
                            Manual edition of system boundaries
                        </figcaption>
                    </figure>
                    <p>
                        The <code>SYSTEMS</code> step handles the separation between
                        systems, and the dispatching of all sections and glyphs to
                        their "containing" system.
                    </p>
                    <p>
                        From that point on, most processings will be done at system 
                        level.
                        This limits the amount of entities (sections & glyphs)
                        to search, and allows to process all systems in parallel, thus
                        taking advantage of the computer hardware architecture.
                    </p>
                    <p>
                        Audiveris tries to define a "smart" border between adjacent
                        systems which assigns the glyphs to the system they logically
                        belong to.
                    </p>
                    <p>
                        You can still manually modify the border, by starting a boundary
                        edition session via the (right-click) context menu
                        <code>Boundaries...</code> | <code>Start edition</code>.
                        The broken lines of all boundaries are highlighted in red color.
                        With the mouse, you can adjust the border by simply dragging the
                        lines and points.
                        An intermediate point is automatically removed when
                        it gets aligned with the previous and the next point.
                        When you are done, end the session by 
                        <code>Boundaries...</code> | <code>Complete edition</code> so that
                        modifications get immediately taken into account.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
                <article id="measures-step">
                    <h3>
                        Measures step
                    </h3>
                    <figure class="right">
                        <img title="Measures"
                             src="../images/measures.png" />
                        <figcaption>
                            Measures defined by barlines
                        </figcaption>
                    </figure>
                    <p>
                        The <code>MEASURES</code> step uses the barlines candidates to
                        build and check the measures of every system. 
                        Global measure consistency is further checked for systems that
                        contain more than a single staff.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
                <article id="texts-step">
                    <h3>
                        Texts step
                    </h3>
                    <figure class="right">
                        <img title="Texts" width="612"
                             src="../images/chula-system-text.png" />
                        <figcaption>
                            System filtered image passed to OCR
                        </figcaption>
                    </figure>
                    <p>
                        The <code>TEXTS</code> step works on each system in 
                        parallel.
                    </p>
                    <p>
                        It first builds an image of the system area, hiding all glyphs 
                        which are too wide or too high, or which intersect a staff 
                        interior.
                    </p>
                    <p>
                        It then hands this filtered system image over to the OCR engine,
                        which performs a layout analysis of the image and the 
                        transcription of the detected text blocks.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="sticks-step">
                    <h3>
                        Sticks step
                    </h3>
                    <figure class="right">
                        <img title="Vertical & horizontal sticks" 
                             src="../images/sticks.png" />
                        <figcaption>Ledgers and stems</figcaption>
                    </figure>
                    <p>
                        The <code>STICKS</code> step searches systems for sticks, either
                        horizontal or vertical.
                    </p>
                    <ul>
                        <li>Horizontal sticks are further checked to be assigned the 
                            <code>LEDGER</code> shape.</li>
                        <li>Vertical sticks can give birth to <code>STEM</code> entities.
                        </li>
                    </ul>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="symbols-step">
                    <h3>
                        Symbols step
                    </h3>
                    <figure class="right">
                        <img title="Identified symbols" 
                             src="../images/symbols.png" />
                        <figcaption>
                            Noteheads in orange and beams in cyan
                        </figcaption>
                    </figure>
                    <p>
                        The <code>SYMBOLS</code> step aggregates unassigned sections 
                        that connect either horizontally or vertically into glyphs.
                    </p>
                    <p>For each glyph, Audiveris computes a series of key parameters
                        based on <abbr title="Angular Radial Transform">ART</abbr>
                        moments (as used by MPEG-7) and feeds the Neural Network 
                        evaluator to look for a suitable shape.
                    </p>
                    <p>Several dedicated patterns are run at system level to further 
                        check and correct the glyphs assignments.
                    </p>
                    <p>The <code>SYMBOLS</code> step iterates at system level on the
                        cycle: aggregation / assignment / patterns.
                    </p>
                    <p>
                        The final glyphs are displayed with a color that is specific
                        to their assigned shape.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="pages-step">
                    <h3>
                        Pages step
                    </h3>
                    <figure class="right">
                        <img title="Translated entities" 
                             src="../images/pages.png" />
                        <figcaption>Logical entities</figcaption>
                    </figure>
                    <p>
                        The <code>PAGES</code> step works at page level to translate
                        all assigned glyphs to their corresponding score logical 
                        entities.
                    </p>
                    <p>
                        Global consistency checks are run at page level, to adjust 
                        parameters such as the time signatures.
                    </p>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="score-step">
                    <h3>
                        Score step
                    </h3>
                    <figure class="right">
                        <img title="Score voices"
                             src="../images/voices.png" />
                        <figcaption>One color for each voice</figcaption>
                    </figure>
                    <p>
                        The <code>SCORE</code> step connects the various pages of a
                        multi-page score (this step is almost void for a single-page
                        score):
                    </p>
                    <ul>
                        <li>Connection of system parts (including voices and
                            instruments) across pages</li>
                        <li>Global measure numbering</li>
                        <li>Use of time signatures to check measure durations</li>
                        <li>Connection of orphaned slurs across pages</li>
                    </ul>
                    <p>
                        Using menu <code>Views</code> | <code>Show score voices</code>,
                        or the related <code class="key">F11</code> key, you can
                        visualize the voices with different colors as shown on the 
                        presented picture.
                    </p>

                    <p>Nota:</p>
                    <ul>
                        <li>For the time being, the <code>SCORE</code> step works on the 
                            pages loaded as parts of the multi-page score in memory.
                        </li>
                        <li>For large scores that won't fit in memory, a different
                            approach is needed, whereby pages will be separately 
                            recognized and saved as MusicXML files. 
                            An offline final reduction task will then run to connect 
                            these pages XML files.
                            Further work is still to be done, but a prototype is already 
                            available in the <code>omr.score.ScoreXmlReduction</code>
                            class.
                        </li>
                    </ul>
                </article>
            </section>


            <!-- =========================================================== -->
            <section>
                <h2 id="development">
                    Development
                </h2>

                <p>This section is meant for developers rather than "plain" 
                    users of Audiveris.</p>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="building">
                    <h3>
                        Building from Source
                    </h3>

                    <dl>
                        <dt>
                        Use of <b>NetBeans</b>
                        </dt>
                        <dd>
                            <p>
                                This is by far the easiest way, whatever your 
                                operating system, to download all the source 
                                pieces from Kenai Mercurial (Hg) repository
                                and build Audiveris from them.
                            </p>
                            <p>
                                Assuming you have NetBeans installed, from
                                the IDE top menu, select <code>Team</code> |
                                <code>Mercurial</code> | 
                                <code>Clone Other...</code> which will take
                                you through 3 steps:
                            </p>
                            <ol>
                                <li>In the <q>Mercurial Repository</q> step, set the
                                    Repository URL to the Kenai address 
                                    <code>https://hg.kenai.com/hg/audiveris~hg</code></li>
                                <li>In the <q>Mercurial Paths</q> step, you can keep the proposed paths</li>
                                <li>In the <q>Destination Directory</q> step, select
                                    the Parent Directory and the Clone Name of
                                    your choice, for example "audiveris~hg"</li>
                            </ol>
                            <p>
                                This will clone the remote Kenai repository to 
                                the chosen local "audiveris~hg" directory in a 
                                couple of minutes and then open the project
                                automatically.
                                Actually, you'll be notified that 2 projects 
                                were cloned.
                                This is so because, inside the main project 
                                (<b>audiveris</b>), there is a subproject
                                (<b>installer</b>) 
                                to handle the installation of Audiveris bundle.
                                Audiveris project depends on Installer project.
                                You can open one or both projects.
                            </p>
                        </dd>

                        <dt>
                        Audiveris project
                        </dt>
                        <dd>
                            <p>
                                NetBeans signals a minor problem:
                                The Java class <code>omr.WellKnowns</code>
                                depends on a <code>ProgramId</code> class 
                                which cannot be found.
                                This ProgramId class provides Hg-based 
                                information and, by design, is always 
                                dynamically generated before any compile is
                                performed, so this initial problem can safely be 
                                ignored and will disappear at first build.
                            </p>

                            <img class="side" title="Web Start dialog" 
                                 src="../images/web-start-dialog.png" />
                            <p>
                                Audiveris application can be built and run in
                                different modes.
                                To switch modes, open the project properties and 
                                select the "Web Start" category dialog:
                            </p>
                            <table id="modes">
                                <tr>
                                    <th>Enable Web Start<br/>checkbox</th>
                                    <th>Codebase<br/>selection</th>
                                    <th>Mode</th>                                    
                                    <th>Comments</th>                                    
                                </tr>
                                <tr>
                                    <td class="checkbox">Unchecked</td>
                                    <td class="codebase">N/A</td>
                                    <td class="mode">Stand-alone</td>
                                    <td>This mode allows to test Audiveris
                                        application locally, with no Installer,
                                        and with no need to sign the resources.
                                        <br/>
                                        Nota: It requires that the needed 
                                        bridging libraries be found in system 
                                        location (since they are not provided 
                                        as Java Web Start resources).
                                        <br/>For Windows: 
                                        <code>jniTessBridge.dll</code> in
                                        <code>c:\windows\system32</code>

                                        <br/>For Ubuntu: 
                                        <code>libjniTessBridge.so</code> in
                                        <code>/usr/lib/jni</code></td>
                                </tr>
                                <tr>
                                    <td class="checkbox" rowspan="2">Checked</td>
                                    <td class="codebase"><i>"Local execution"</i>
                                    </td>
                                    <td class="mode">Local<br/>
                                        Java Web Start</td>
                                    <td>This mode allows to test the Java Web 
                                        Start mechanisms with all resources kept
                                        locally.</td>
                                </tr>
                                <tr>                                    
                                    <td class="codebase"><i>"User defined"</i></td>
                                    <td class="mode">Remote<br/>
                                        Java Web Start</td>
                                    <td>This mode uses Java Web Start with all
                                        resources downloaded from a remote
                                        location.<br/>
                                        Define Codebase Preview as the remote
                                        URL, typically 
                                        <code>https://audiveris.kenai.com/jnlp</code>.
                                        <br/>Use a WebDAV, such as BitKinex, to
                                        upload the content of the local 
                                        <code>dist</code> folder to the remote 
                                        web location before any actual use.
                                    </td>
                                </tr>
                            </table>
                            <br class="clear" />

                            <img class="side" title="Signing dialogr" 
                                 src="../images/signing.png" />
                            <p>
                                When using Java Web Start (either local or 
                                remote) all the resources listed in the JNLP
                                file must be signed, because of the use of
                                native libraries.
                            </p>
                            <p>
                                This signing is handled automatically by the 
                                build mechanism, based on the informations
                                provided in the Signing dialog box through the
                                <code class="button">Customize</code> button.
                            </p>
                            <p>
                                Here we use a local keystore ("AudiverisLtd.keystore")
                                located in project parent folder and
                                where the alias "signFiles" has been defined
                                using the <code>keytool</code> utility.
                                This alias is then  used by the build task to
                                sign the resources.
                                Note that all resources must be signed by the
                                same certificate.
                            </p>
                        </dd>

                        <dt class="clear">
                        Installer project
                        </dt>
                        <dd>
                            <p>
                                One works on the Installer project only to
                                modify the installer features, otherwise it gets
                                automatically built from Audiveris project which
                                depends on it.
                            </p>
                            <p>
                                In fact, the Installer does not know it is part
                                of a Java Web Start installation. 
                                It is a plain Java program called by javaws
                                as an extension of Audiveris installation,
                                with a single argument: "install" for 
                                installation and "uninstall" for uninstallation.
                            </p>
                            <p>
                                It can be modified, tested and debugged in a
                                stand-alone manner, with proper argument 
                                ("install" or "uninstall").
                                To ease compilation and test without a real
                                javaws underneath, the <code>javax.jnlp</code>
                                package, which provides the JNLP services, is 
                                simply described through a facade.
                            </p>
                            <p>
                                A final advice: since the Installer has to write
                                in protected locations, debugging is more 
                                convenient when the whole NetBeans session has 
                                been launched at administrator level.
                            </p>
                        </dd>

                        <dt> 
                        Customization
                        </dt>
                        <dd>
                            <p>
                                The build process uses global variables
                                gathered in <code>dev/build.default.properties
                                </code> file.
                            </p>
                            <p>
                                To adapt the build process to your environment,
                                you can override some of these variables
                                in a potential <code>build.properties</code> file.
                                This file can be located in the <code>dev</code>
                                directory or in the user directory.
                                For Windows, the user directory is 
                                <code>%APPDATA%/AudiverisLtd/audiveris</code>.
                            </p>
                        </dd>

                        <dt>Organization</dt>
                        <dd>
                            For your information, the general organization of
                            the target Audiveris folders is detailed
                            in the <a href="#folders">Folders</a> section.                            
                        </dd>
                    </dl>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="linux">
                    <h3>
                        Linux specials
                    </h3>
                    <p class='warning indent'>
                        Please note that this section is obsolete since
                        users are now encouraged to use the single Java Web 
                        Start approach available for Windows and for Ubuntu.
                        It can still be useful for other Linux versions or for
                        people that prefer building Audiveris on their own.
                    </p>
                    <p> 
                        Due to impossibility to support the sheer number of Linux
                        distributions and different binary formats used, we 
                        provide fully automated installation packages only for 
                        <b>Ubuntu</b>.
                    </p>
                    <p>
                        For all other distributions we provide generic 
                        application packages coupled with detailed installation
                        instructions.
                        On non-Ubuntu Linux you would need to install various
                        required components manually. 
                        For further information, please refer to the 
                        <a href="#generic-linux">Manual installation</a>
                        section
                    </p>
                    <h4 id="linux-debian">
                        Full installation on Ubuntu 12.04 and above
                    </h4>
                    <p>
                        <b>Note:</b> Our Ubuntu packages won't work on 
                        versions prior to 12.04 or architectures other than 
                        Intel i386/amd64.
                    </p>                    
                    <p> The <b>Ubuntu 12.04</b> packages are available on the 
                        <a href="http://kenai.com/projects/audiveris/downloads">
                            download area</a> of Audiveris project and match the
                        <code>audiveris-<i>V.v.r</i>-ubuntu-<i>arch</i>.deb</code>
                        naming schema, where <q>V.v.r</q> denotes Audiveris
                        version+revision and <q>arch</q> the hardware 
                        architecture (<code>i386</code> for Intel 32bit or 
                        <code>amd64</code> for 64bit).
                    </p>

                    <h4 id="linux-generic">Generic Audiveris package</h4>
                    <p><b>Note:</b>
                        This <q>generic</q> Audiveris application package is 
                        intended to install on any Linux the Audiveris 
                        application, music font and desktop integration.
                        However, this package requires that <b>Tesseract</b>
                        shared libraries are already present or the installation
                        will fail.
                        So, refer to section <a href="#manual-ocr">Installing 
                            Tesseract OCR</a> to install Tesseract beforehand.
                    </p>
                    <p>
                        Generic RPM packages suitable for installation on
                        <b>OpenSUSE</b>, <b>Fedora</b>, <b>Madriva</b> and 
                        others are available on the 
                        <a href="http://kenai.com/projects/audiveris/downloads">
                            download area</a> of Audiveris project.
                        The packages match the 
                        <code>audiveris-<i>V.v.r</i>-generic-<i>arch</i>.rpm</code>
                        naming schema, where <q>V.v.r</q> denotes Audiveris
                        version+revision and <q>arch</q> the hardware 
                        architecture (<code>i386</code> for Intel 32bit or
                        <code>x86_64</code> for 64bit).
                    </p>

                    <h4 id="linux-others">
                        Other targets than Ubuntu, OpenSUSE or Fedora</h4>
                    <p>
                        The basic steps will be the same as given in the
                        <a href="#linux-manual">Manual installation</a> section,
                        though the real commands will vary heavily depending on your
                        distribution and hardware architecture.
                        You can post requests on 
                        <a href="http://www.leptonica.com/download.html">Audiveris
                            forum</a> if you need additional instructions.
                    </p>                    

                    <h4 id="linux-manual">Manual Installation</h4>
                    <p> 
                        This section provides step-by-step guide on how to install
                        Audiveris on different, mainly non-Ubuntu, Linux distributions,
                        because those don't provide pre-built binary libraries for Tesseract
                        3.02. 
                        You are assumed to be familiar with the process of compiling
                        and installing software from source. 
                        Moreover, this guide assumes
                        some basic level of familiarity with command line operation. 
                    </p>
                    <p> 
                        Basically, the installation of Audiveris on a particular
                        Linux distribution consists of the following steps 
                        (most of them require the user to type commands in a 
                        terminal):
                    </p>
                    <ul>
                        <li>(compiling and) installing Google's Tesseract
                            optical character recognition engine</li>
                        <li>installing language files for Tesseract</li>
                        <li>installing Java Runtime Environment</li>
                        <li>installing Ghostscript - an open-source tool for
                            manipulating PDF documents</li>
                    </ul>

                    <h5 id="manual-ocr">Installing Tesseract OCR</h5>
                    <p>
                        At the time of this writing, Tesseract project doesn't 
                        officially provide binary packages for Linux. 
                        Therefore, you need to compile and install Tesseract 
                        libraries manually.
                    </p>
                    <dl>
                        <dt>Installing Tesseract on OpenSUSE 12.2</dt>

                        <dd>
                            <p>
                                OpenSUSE 12.2 offers unofficial binary packages
                                for Tesseract' shared libraries. 
                                This simplifies the installation greatly. 
                                Please proceed as follows:
                            </p>
                            <ol>
                                <li>in your browser, go to <a href="http://software.opensuse.org/package/liblept3">
                                        Leptonica download page</a> , select <q>OpenSUSE 12.2</q> then <q>Show
                                        unstable packages</q>. Click on the proper package from <q>Lazy_Kent</q>
                                    according to your hardware architecture (32 or 64 bit) and follow
                                    the instructions to install Leptonica.
                                </li>
                                <li>in your browser, go to <a href="http://software.opensuse.org/package/libtesseract3">
                                        Tesseract download page</a> , select <q>OpenSUSE 12.2</q> then <q>Show
                                        unstable packages</q>. Click on the proper package from <q>Lazy_Kent</q>
                                    (version 3.02.02!) according to your hardware architecture (32 or
                                    64 bit) and follow the instructions to install Tesseract' shared
                                    libraries.
                                </li>
                            </ol>
                        </dd>

                        <dt>Installing Tesseract on Fedora 17</dt>
                        <dd>
                            <p>
                                Due to the lack of any binary packages for 
                                Tesseract in the Fedora distribution, you need 
                                to compile this software manually.
                            </p>

                            <dl>

                                <dt>Installing development tools</dt>
                                <dd>
                                    <p>In order to be able to compile software from sources, you need to
                                        install development tools first because those are likely not present
                                        on your system by default. Please run the following commands in your
                                        terminal:
                                    </p>
                                    <p class="code">
                                        sudo yum groupinstall "Development Tools"
                                    </p>
                                </dd>

                                <dt>Installing Tesseract dependencies</dt>
                                <dd>
                                    <p>
                                        Tesseract OCR depends on the image processing library called
                                        <b>Leptonica</b>, which, in turn, depends on several image formats like
                                        JPEG, PNG, TIFF and GIF. These formats are usually supported by
                                        external libraries. You need to install the development versions for
                                        each of those libraries:
                                    </p>
                                    <p class="code">sudo yum
                                        install zlib-devel libpng-devel libjpeg-devel libtiff-devel
                                        giflib-devel</p>
                                    <p>Now check out Leptonica's source code and unpack it:</p>
                                    <pre class="code">
sudo yum install wget
wget http://www.leptonica.com/source/leptonica-1.69.tar.gz
gunzip leptonica-1.69.tar.gz
tar -xvf leptonica-1.69.tar</pre>
                                    <p>Alternatively, you can download the source using your browser here:
                                        <a href="http://www.leptonica.com/download.html">http://www.leptonica.com/download.html</a></p>
                                    <p>Let us configure, build and install Leptonica now:</p>
                                    <pre class="code">
cd [path to leptonica-1.69 folder]
./configure --disable-programs
make
sudo make install</pre>
                                    <p>This will install Leptonica libraries to
                                        /usr/local/lib.</p>
                                </dd>
                                <dt>Compiling and installing Tesseract</dt>
                                <dd>
                                    <ul>
                                        <li>Download Tesseract source using your browser or <code>wget</code>
                                            from here:
                                            http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz</li>
                                        <li>Unpack it to an easily accessible directory, for example
                                            <code>/home/user/Documents/</code>. 
                                            You should see <code>tesseract-ocr</code> folder in
                                            your working directory.
                                        </li>
                                        <li>Start up the terminal and change to that source directory: 
                                            <pre class="code">cd /home/user/Documents/tesseract-ocr</pre></li>
                                        <li>Now run the following commands in order to compile und install
                                            Tesseract to /usr/local/lib:
                                            <pre class="code">
./autogen.sh
./configure
make
sudo make install</pre>
                                        </li>
                                    </ul>
                                    <p style="margin-top: -4px;" role="link"><u>The following instructions
                                    in this section are only valid for the Fedora 17 distribution!</u>
                                </p>
                                <p style="margin-top: -4px;" role="link">Fedora, as a Red-Hat<code></code>-derived
                                    distribution, doesn't include <code>/usr/local/lib</code> in its library search
                                    path. Therefore, it's necessary to add that path so that Tesseract
                                    shared libraries can be be found by Audiveris application. Please
                                    proceed as follows:</p>
                                <pre class="code">su - -c 'gedit /etc/ld.so.conf'</pre>
                                <p>Append the following path to
                                    the end of the file if it's not already there:
                                </p>
                                <pre class="code">/usr/local/lib</pre>
                                <p>Save the file and reconfigure
                                    the dynamic linker by issuing the following command:
                                </p>
                                <pre class="code">sudo ldconfig</pre>
                        </dd>
                    </dl>
                    </dd>
                    </dl>

                    <h5 id="manual-ocr-files">
                        Installing language files for Tesseract
                    </h5>
                    <p>
                        Tesseract requires several language data files to be present on
                        your machine. The following commands will install data for English<code></code>,
                        German, French and Italian languages:
                    </p>
                    <ul>
                        <li>Create the working directory named <code>tesseract-ocr</code> somewhere,
                            for example: <code>/home/user/Documents/tesseract-ocr</code>.
                            If you have compiled Tesseract from sources, this 
                            will be the source code directory.
                        </li>
                        <li>Download required language files from here:
                            <a href="http://code.google.com/p/tesseract-ocr/downloads/">
                                http://code.google.com/p/tesseract-ocr/downloads/</a>.
                            These files
                            follow the naming schema <code>tesseract-ocr-3.02.XXX.tar.gz</code>
                            where <q>XXX</q> denotes language code, i.e. eng = English,
                            deu = German, ita = Italian and fra = French.</li>
                        <li>Place the obtained language files into parent directory of
                            <code>tesseract-ocr</code>, i.e. <code>/home/user/Documents/</code>.</li>
                        <li>Double-click them to unpack.
                            The data will be automatically extracted into 
                            <code>tessdata</code> directory inside of the 
                            <code>tesseract-ocr</code> directory.</li>
                        <li>Start up the terminal and run the following command: 
                            <pre class="code">sudo cp -r <i>path_to_tessdata_folder</i> <i>destination</i></pre> 
                            where <q>path_to_tessdata_folder</q> denotes
                            <code>/home/user/Documents/tesseract-ocr/tessdata </code>
                            in this example and <q>destination</q> - either
                            <code>/usr/local/share</code> when compiled from 
                            source or <code>/usr/share</code> when
                            installed using OpenSUSE binary packages.</li>
                    </ul>
                    <p>
                        You need to set <code>TESSDATA_PREFIX</code> environment
                        variable to point to the parent directory of the 
                        <code>tessdata</code> in order to tell Audiveris
                        where language data are located.
                    </p>
                    <p>
                        To edit the global profile, run the following command 
                        in the terminal:
                    </p>
                    <ul>
                        <li>
                            <code>su - -c 'gedit /etc/profile.local'</code>
                            on OpenSUSE,
                        </li>
                        <li>
                            <code>su - -c 'gedit /etc/profile.d/local.sh'</code>
                            on Fedora.
                        </li>
                    </ul>

                    <p>
                        Append the following line:
                    </p>
                    <ul>
                        <li>
                            <code>export TESSDATA_PREFIX=/usr/local/share</code>
                            on Fedora 17,
                        </li>
                        <li>
                            <code>export TESSDATA_PREFIX=/usr/share</code>
                            on OpenSUSE.
                        </li>
                    </ul>
                    <p>
                        Save the file, then log out and log in again in order
                        to activate the changes.
                    </p>

                    <h5 id="manual-jre">
                        Installing Java Runtime Environment (JRE)
                    </h5>
                    <p>Audiveris requires Java 7. Please install it as follows:</p>
                    <ul>
                        <li>
                            <code>sudo zypper install java-1_7_0-openjdk</code>
                            on OpenSUSE,
                        </li>
                        <li>
                            <code>sudo yum install java-1.7.0-openjdk</code>
                            on Fedora.
                        </li>
                    </ul>
                    <p>
                        To test your JRE installation, run the following command:
                    </p>
                    <pre class="code">java -version</pre>

                    <p>
                        You should see something similar to:
                    </p>
                    <pre class="code">
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (fedora-2.3.3.fc17-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)</pre>

                    <h5 id="manual-ghostscript">
                        Installing Ghostscript
                    </h5>
                    <p>
                        Audiveris requires Ghostscript (an interpreter for the PostScript
                        language and for PDF) in order to deal with PDF files.
                        Ghostscript is already installed by default on both
                        OpenSUSE and Fedora.
                        Audiveris requires Ghostscript 9.05 or higher.
                        To verify that, run the following command in the terminal:
                    </p>
                    <pre class="code">gs --version</pre>
                </article>

                <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

                <article id="folders">
                    <h3>
                        Folders
                    </h3>

                    <p>This article describes the organization of folders on the
                        target machine, depending on the operating system.</p>
                    <p>Some folders are annotated with a <code>CONSTANT_NAME</code>
                        which represents a direct link from Java code.</p>

                    <h4 id="system-folder">
                        System
                    </h4>

                    <p>Libraries that can be shared at system level.
                        This applies for Tesseract libraries.
                        These shareable libraries are installed by Audiveris
                        bundle installer.
                    </p>

                    <table class="location">
                        <tr><th>OS</th><th>Root</th></tr>
                        <tr>
                            <td>Windows</td>
                            <td>C:/Windows/System32/</td>
                        </tr>
                        <tr>
                            <td>Ubuntu</td>
                            <td>/usr/lib/jni</td>
                        </tr>
                        <tr>
                            <td>Generic</td>
                            <td>???</td>
                        </tr>
                    </table>      

                    <table class="content">
                        <thead>
                            <tr>
                                <th>Folder</th>
                                <th>Description</th>
                                <th>Content</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>.</td>
                                <td>(Windows) Shared libraries</td>
                                <td>
                                    liblept168.dll<br/>
                                    libtesseract302.dll
                                </td>
                            </tr>
                            <tr>
                                <td>.</td>
                                <td>(Ubuntu) Shared libraries</td>
                                <td>
                                    libjniTessBridge.so
                                </td>
                            </tr>
                        </tbody>
                    </table>

                    <h4 id="companion-folders">
                        Companions
                    </h4>

                    <p>This concerns only the two <b>native</b> companion 
                        programs used by Audiveris application, namely 
                        Ghostscript and Tesseract.
                        (Other companions are used but they are Java libraries, 
                        and are simply located next to Audiveris Java archive).
                    </p>

                    <h5>Ghostscript</h5>

                    <p>A Ghostscript sub-process is used to convert on-the-fly 
                        a PDF input file into a temporary TIFF file which is 
                        then read by Audiveris.</p>

                    <p>A suitable Ghostscript version is checked and installed
                        as needed by Audiveris bundle installer.</p>

                    <h5>Tesseract</h5>

                    <p>Tesseract is used as the OCR engine, called repeatedly
                        by Audiveris via a JNI interface.</p>

                    <ol>
                        <li>Because of the size of their related files,
                            just a few languages are provided by default through
                            Audiveris installation.
                            <ul>
                                <li>On Windows, they are located by default in
                                    the folder for 32-bit applications: 
                                    <code>c:\Program Files (x86)\tesseract-ocr\</code>.
                                    <br/>
                                    However, if Tesseract application itself has
                                    been installed from Tesseract web site,
                                    the <code>TESSDATA_PREFIX</code> environment
                                    variable points to the target folder.
                                    But note that Tesseract application is not 
                                    needed by Audiveris, which uses a DLL
                                    library.</li>
                                <li>On Linux, they are located in the shareable
                                    tesseract folder
                                    <code>/usr/share/tesseract-ocr/</code>
                                </li>
                            </ul>
                        <li>Additional languages can be downloaded and installed
                            through the Audiveris bundle installer.
                        </li>
                    </ol>

                    <h4 id="application-folder">
                        Application
                    </h4>

                    <p>
                        Audiveris application program and (read-only) data
                        are no longer directly visible.
                        They are handled by the global Java cache, and "visible"
                        only through the cache viewer.
                    </p>

                    <p>
                        For your information, this concerns the Audiveris main 
                        jar file, plus all the needed Java libraries as well as
                        the needed resources including the OS- and ARCH-dependent
                        JNI bridges ("jniTessBridge.dll" or "libjniTessbridge.so")
                        to shareable native libraries.
                    </p>

                    <p>Specific notes for <b>Ubuntu</b>:</p>
                    <ul>
                        <li>Folder <code>/usr/bin</code> 
                            contains an "audiveris" executable file,
                            a shell script to launch Audiveris application.</li>
                        <li>Folder <code>/usr/share/doc/audiveris</code> 
                            contains a "copyright" file that describes licenses
                            and copyrights about Audiveris companions.</li>
                        <li>Folder <code>/usr/share/icons/audiveris</code> 
                            contains audiveris icon as an "audiveris.png" file.</li>
                    </ul>

                    <h4 id="gui-persistency">
                        GUI persistency
                    </h4>

                    <p>User persistency of graphic interface
                        across applications runs.</p>

                    <table class="location">
                        <tr><th>OS</th><th>Root</th></tr>
                        <tr>
                            <td>Windows</td>
                            <td>%APPDATA%/AudiverisLtd/audiveris/</td>
                        </tr>
                        <tr>
                            <td>Ubuntu</td>
                            <td>~/.audiveris/</td>
                        </tr>
                        <tr>
                            <td>Generic</td>
                            <td>???</td>
                        </tr>
                    </table>

                    <table class="content">
                        <thead>
                            <tr>
                                <th>Folder</th>
                                <th>Description</th>
                                <th>Content</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>.</td>
                                <td>User interface persistency</td>
                                <td>One file per frame:<br/>
                                    aboutDialog.session.xml<br/>
                                    mainFrame.session.xml<br/>
                                    optionsFrame.session.xml<br/>
                                    SampleVerifierFrame.session.xml<br/>
                                    scoreParams.session.xml<br/>
                                    trainerFrame.session.xml<br/>
                                    etc...
                                </td>
                            </tr>
                        </tbody>
                    </table>

                    <h4 id="user-config">
                        User config 
                    </h4>

                    <p>User-specific read-write configuration data
                        (<b><code>CONFIG_FOLDER</code></b>),
                        installed by Audiveris bundle installer.</p>

                    <table class="location">
                        <tr><th>OS</th><th>Root</th></tr>
                        <tr>
                            <td>Windows</td>
                            <td>%APPDATA%/AudiverisLtd/audiveris/config/</td>
                        </tr>
                        <tr>
                            <td>Ubuntu</td>
                            <td>~/.config/AudiverisLtd/audiveris/</td>
                        </tr>
                        <tr>
                            <td>Generic</td>
                            <td>$XDG_CONFIG_HOME/AudiverisLtd/audiveris/</td>
                        </tr>
                    </table>

                    <table class="content">
                        <thead>
                            <tr>
                                <th>Folder</th>
                                <th>Description</th>
                                <th>Content</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>.</td>
                                <td>Configuration files</td>
                                <td>run.properties<br/>
                                    user-actions.xml</td>
                            </tr>
                            <tr>
                                <td>./plugins<br/>
                                    <code>PLUGINS_FOLDER</code></td>
                                <td>Javascript plugins</td>
                                <td>finale-notepad.js<br/>
                                    finale.js<br/>
                                    musescore.js</td>
                            </tr>
                        </tbody>
                    </table>

                    <h4 id="user-data">
                        User data 
                    </h4>

                    <p>User-specific read-write data (<b><code>DATA_FOLDER</code></b>),
                        installed by Audiveris bundle installer.</p>
                    <p>
                        This also includes the folders <code>examples</code> and
                        <code>www</code> which, stricly speaking, should be 
                        read-only application data but need to be browsable and
                        thus could not be left packaged in the Java cache.
                    </p>

                    <table class="location">
                        <tr><th>OS</th><th>Root</th></tr>
                        <tr>
                            <td>Windows</td>
                            <td>%APPDATA%/AudiverisLtd/audiveris/data/</td>
                        </tr>
                        <tr>
                            <td>Ubuntu</td>
                            <td>~/.local/share/AudiverisLtd/audiveris/</td>
                        </tr>
                        <tr>
                            <td>Generic</td>
                            <td>$XDG_DATA_HOME/AudiverisLtd/audiveris/</td>
                        </tr>
                    </table>

                    <table class="content">
                        <thead>
                            <tr>
                                <th>Folder</th>
                                <th>Description</th>
                                <th>Content</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>./benches<br/>
                                    <code>DEFAULT_BENCHES_FOLDER</code></td>
                                <td>Default location for results of program bench</td>
                                <td>One file SCORE.bench.properties per score benched</td>
                            </tr>
                            <tr>
                                <td>./eval<br/>
                                    <code>EVAL_FOLDER</code></td>
                                <td>User-trained data</td>
                                <td>neural-network.xml<br/>
                                    linear-evaluator.xml</td>
                            </tr>
                            <tr>
                                <td>./examples<br/>
                                    <code>EXAMPLES_FOLDER</code></td>
                                <td>Examples of input images</td>
                                <td>allegretto.png<br/>
                                    autothreshold_test.JPG<br/>
                                    batuque.png<br/>
                                    carmen-1.png<br/>
                                    chula.1bit.bmp<br/>
                                    chula.png<br/>
                                    cucaracha.png<br/>
                                    Dichterliebe01.pdf<br/>
                                    SchbAvMaSample.pdf<br/>
                                    zizi.png
                                </td>
                            </tr>
                            <tr>
                                <td>./print<br/>
                                    <code>DEFAULT_PRINT_FOLDER</code></td>
                                <td>Default location for score printing</td>
                                <td>One file SCORE.pdf per print</td>
                            </tr>
                            <tr>
                                <td>./scores<br/>
                                    <code>DEFAULT_SCORES_FOLDER</code></td>
                                <td>Default location for MusicXML export</td>
                                <td>One file SCORE.xml per export
                            </tr>
                            <tr>
                                <td>./scripts<br/>
                                    <code>DEFAULT_SCRIPTS_FOLDER</code></td>
                                <td>Default location for user scripts</td>
                                <td>One file SCORE.script.xml per script</td>
                            </tr>
                            <tr>
                                <td>./temp<br/>
                                    <code>TEMP_FOLDER</code></td>
                                <td>Temporary files</td>
                                <td>audiveris.log (log file)<br/>
                                    00n-sS-scanSystem.tif (system image)<br/>
                                    00n-sS-gGGGG-retrieveOcrLine.tif (glyph image)</td>
                            </tr>
                            <tr>
                                <td>./train<br/>
                                    <code>TRAIN_FOLDER</code></td>
                                <td>Material for training</td>
                            </tr>
                            <tr>
                                <td>./train/samples</td>
                                <td>Isolated samples</td>
                                <td>One folder for samples of same sheet</td>
                            </tr>
                            <tr>
                                <td>./train/sheets</td>
                                <td>Whole sheet glyphs</td>
                                <td>One folder per sheet</td>
                            </tr>
                            <tr>
                                <td>./train/symbols<br/>
                                    <code>SYMBOLS_FOLDER</code></td>
                                <td>Predefined symbols based on MusicalSymbols
                                    font</td>
                                <td>One file SHAPE.xml per shape</td>
                            </tr>
                            <tr>
                                <td>./www<br/>
                                    <code>DOC_FOLDER</code></td>
                                <td>Application documentation</td>
                                <td>The whole set of Audiveris documentation,
                                    including home page and handbook.
                            </tr>
                        </tbody>
                    </table>

                </article>

            </section>

        </div>

        <!-- =============================================================== -->

        <!-- Table of content in left-column -->
        <div class="left-column">
            <nav>
                <p style="text-align: right;"><a href="#top">Top</a></p>
                <ol>
                    <li>
                        <input type="button"  value="+" class="expander" onclick="toggleInput(this)">
                        <a class="inline" href="#getting-started">Getting started</a> 
                        <div class="expandable">                            
                            <ul>                  
                                <li><a href="#jws">Java Web Start</a>
                                    <ul>
                                        <li><a href="#first-launch">First launch</a></li>                                        
                                        <li><a href="#next-launches">Next launches</a></li>                                        
                                        <li><a href="#java-cache">Java cache</a></li>                                        
                                        <li><a href="#uninstallation">Uninstallation</a></li>                                        
                                    </ul>
                                </li>
                                <li><a href="#loading-an-image">Loading an image</a></li>
                                <li><a href="#transcription">Transcription</a>
                                    <ul>
                                        <li><a href="#main-window-layout">Main layout</a></li>
                                        <li><a href="#sheet-display-modes">Display modes</a></li>
                                    </ul>
                                </li>
                                <li><a href="#outputs">Outputs</a></li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <input type="button"  value="+" class="expander" onclick="toggleInput(this)">
                        <a class="inline" href="#basics">Basics</a>
                        <div class="expandable">                            
                            <ul>                  
                                <li><a href="#entities">Entities</a></li>
                                <li><a href="#tools">User tools</a>
                                    <ul>
                                        <li><a href="#mouse">Mouse</a></li>
                                        <li><a href="#boards">Boards</a></li>
                                        <li><a href="#context-menu">Context menu</a></li>
                                        <li><a href="#score-parameters">Score parameters</a></li>
                                        <li><a href="#errors-window">Error window</a></li>
                                    </ul>
                                </li>
                                <li><a href="#glyph-merge">Merge</a></li>
                                <li><a href="#glyph-assignment">Assignment</a></li>
                                <li><a href="#glyph-split">Split</a></li>
                                <li><a href="#glyph-insertion">Insertion</a></li>
                                <li><a href="#text-correction">Text correction</a></li>
                                <li><a href="#whole-examples">Whole examples</a></li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <input type="button"  value="+" class="expander" onclick="toggleInput(this)">
                        <a class="inline" href="#advanced">Advanced</a>
                        <div class="expandable">                            
                            <ul>                  
                                <li><a href="#arguments">Arguments</a>
                                    <ul>
                                        <li><a href="#jvm-arguments">JVM</a></li>
                                        <li><a href="#appli-arguments">Application</a></li>
                                    </ul>
                                </li>
                                <li><a href="#log">Log</a></li>
                                <li><a href="#script">Script</a></li>
                                <li><a href="#plugins">Plugins</a></li>
                                <li><a href="#options">Options</a></li>
                                <li><a href="#training">Training</a>
                                    <ul>
                                        <li><a href="#persist-manuals">Persistence</a></li>
                                        <li><a href="#save-score-samples">Saving samples</a></li>
                                        <li><a href="#sample-verifier">Sample verifier</a></li>
                                        <li><a href="#trainer">Trainer</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <input type="button"  value="+" class="expander" onclick="toggleInput(this)">
                        <a class="inline" href="#internals">Internals</a>
                        <div class="expandable">                            
                            <ul>                  
                                <li><a href="#load-step">Load</a></li>
                                <li><a href="#scale-step">Scale</a></li>
                                <li><a href="#grid-step">Grid</a></li>
                                <li><a href="#systems-step">Systems</a></li>
                                <li><a href="#measures-step">Measures</a></li>
                                <li><a href="#texts-step">Texts</a></li>
                                <li><a href="#sticks-step">Sticks</a></li>
                                <li><a href="#symbols-step">Symbols</a></li>
                                <li><a href="#pages-step">Pages</a></li>
                                <li><a href="#score-step">Score</a></li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <input type="button"  value="+" class="expander" onclick="toggleInput(this)">
                        <a class="inline" href="#development">Development</a>
                        <div class="expandable">                            
                            <ul>                  
                                <li><a href="#building">Building from source</a></li>
                                <li><a href="#linux">Linux specials</a>
                                    <ul>
                                        <li><a href="#linux-debian">Ubuntu</a></li>
                                        <li><a href="#linux-generic">Generic RPMs</a></li>
                                        <li><a href="#linux-others">Others</a></li>
                                        <li><a href="#linux-manual">Manual install</a>
                                            <ul>
                                                <li><a href="#manual-ocr">OCR</a></li>
                                                <li><a href="#manual-ocr-files">Languages</a></li>
                                                <li><a href="#manual-jre">Java runtime</a></li>
                                                <li><a href="#manual-ghostscript">Ghostscript</a></li>
                                            </ul>
                                        </li>
                                    </ul>                                
                                </li>
                                <li><a href="#folders">Folders</a>
                                    <ul>
                                        <li><a href="#system-folder">System</a></li>
                                        <li><a href="#companion-folders">Companions</a></li>
                                        <li><a href="#application-folder">Application</a></li>
                                        <li><a href="#gui-persistency">GUI persistency</a></li>
                                        <li><a href="#user-config">User config</a></li>
                                        <li><a href="#user-data">User data</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ol>
            </nav>
        </div>

        <!-- Needed initializations for expansion mechanism -->
        <script src="../../branding/js/expansion.js"></script> 
        <script>
            collapseAll();
        </script>
    </body>
</html>
